purescript-contrib / purescript-formatters

Formatting and printing for numeric and date/time/interval values
Apache License 2.0
41 stars 30 forks source link

Formatter for arbitrary-precision numbers #57

Open ntwilson opened 4 years ago

ntwilson commented 4 years ago

Formatting numbers larger than +/- 1e20 (or smaller than +/- 1e-20) can give a wrong answer because of floating point precision problems.
I don't think there's any call to actually implement a formatter for arbitrary-precision numbers (like purescript-decimals in this library, but it might be nice to offer some guidance documentation on how to implement a formatter for something like that.