Fix prelude definitions of abs/signum for Floats/Doubles

Shachaf Ben-Kiki shachaf at gmail.com
Mon Apr 22 01:15:09 CEST 2013


On Sun, Apr 21, 2013 at 4:10 PM, Daniel Fischer
<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



More information about the Libraries mailing list