[Haskell-beginners] How to convert a float or double number into a string?

Stephen Tetley stephen.tetley at gmail.com
Wed Sep 18 18:47:00 CEST 2013


It you don't mind truncation from the outset there is Data.Fixed.


On 18 September 2013 17:16, David McBride <toad3k at gmail.com> wrote:

> Show is not truncating anything.  Show never had those digits to read from
> in the first place.  The problem is that once you convert to floats or
> doubles, the number will be truncated.  They do not have infinite
> precision.  You cannot pass a literal float and have it go to infinite
> precision.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130918/76b1c250/attachment.htm>


More information about the Beginners mailing list