Fix prelude definitions of abs/signum for Floats/Doubles

Simon Peyton-Jones simonpj at microsoft.com
Mon Apr 22 10:25:14 CEST 2013


| > <daniel.is.fischer at googlemail.com> wrote:
| > > Also
| > >
| > >     abs x
| > >
| > >         | x < 0 = negate x
| > >         | otherwise = x
| > >
| > > keeps the number of tests at one.
| >
| > This gives the wrong result for -0.0 (which is compare-equal to +0.0).
| >
| >     Shachaf

I'm very happy to see all this activity on making GHC's numerics better.  For this particular thread, would someone like to create a ticket?

My list of numeric infelicities is under "Better numerics" on
http://hackage.haskell.org/trac/ghc/wiki/Status/SLPJ-Tickets

If any of you feel able to make progress on these things, it'd be great.

Simon



More information about the Libraries mailing list