[Haskell-cafe] 0/0 > 1 == False
Don Stewart
dons at galois.com
Fri Jan 11 02:05:02 EST 2008
cristi:
> On Fri, 11 Jan 2008 08:34:10 +0200, Don Stewart <dons at galois.com> wrote:
>
> >>NaN is not 'undefined'
> >>
> >>(0/0) /= (0/0) is True
> >>(0/0) == (0/0) is False
> >>
> >>You can use these to test for NaN.
>
> >You can also use isNaN :)
> >
> > Prelude> isNaN (1/0)
> > False
> > Prelude> isNaN (0/0)
> > True
>
> Not true in Hugs.
Report it to the Hugs guys (iirc they use their own math lib).
P.S. Why are you using Hugs?
-- Don
More information about the Haskell-Cafe
mailing list