bug in displaying fixed numbers

Simon Marlow [email protected]
Fri, 26 Oct 2001 10:01:53 +0100


> I was very surprised when I discovered (writing a bit more complicated
> program) that a program like
>=20
> > import Numeric ( floatToDigits )
> > print $ showFFloat Nothing 0.01 ""
>=20
> enters in to infinite loop. I found that (formatRealFloat FFFixed
> Nothing) do not like displaying numbers less than 0.1.

Yes, the code was recently discovered to be buggy and has been fixed in
the revised Haskell 98 report.  GHC 5.02 is using the fixed version.

Cheers,
	Simon