Bounded and floating types

Ketil Malde ketil+haskell at ii.uib.no
Wed Dec 5 03:18:38 EST 2007


Stefan O'Rear <stefanor at cox.net> writes:

> It's rather worse than that.
>
> Prelude> let nan = 0/0
> Prelude> nan > nan
> False
> Prelude> nan < nan
> False
> Prelude> nan == nan
> False

And this begs the question:

  Prelude> compare nan nan
  GT

So while NaN is greater than itself, it is at the same time not
greater than itself?

-k  
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Libraries mailing list