[project @ 2001-08-29 14:32:49 by simonmar]
authorsimonmar <unknown>
Wed, 29 Aug 2001 14:32:49 +0000 (14:32 +0000)
committersimonmar <unknown>
Wed, 29 Aug 2001 14:32:49 +0000 (14:32 +0000)
commitbe1ec6742c6ed6f2c1cc550f87e009be3ab45f78
tree048e36df5000243a0b88b1e64ad20a27f2f2ccb7
parentc31a55d1d200e9d1d72d0f09fce5204c425b801d
[project @ 2001-08-29 14:32:49 by simonmar]
Fix *two* bugs in formatRealFloat:

The first one is in the Haskell 98 errata, namely that negative
exponents cause an infinite loop in the FFFixed case when no precision
is specified.  eg. `Numeric.showFFloat Nothing 0.02 ""'  I've modified
the code in the errata to properly handle the e == 0 case and to be
slightly more efficient when e > 0.

The second bug is this:

   Prelude> Numeric.showFFloat (Just 0) 0.02 ""
   "0."
ghc/lib/std/PrelFloat.lhs