[Haskell-cafe] haskell gsoc proposal for richer numerical type classes and supporting algorithms

wren ng thornton wren at freegeek.org
Thu Apr 8 19:58:08 EDT 2010

Gregory Crosswhite wrote:
> On Apr 8, 2010, at 12:25 PM, Casey McCann wrote:
>> Seriously, floating point so-called "numbers" don't even have
>> reflexive equality!
> They don't?  I am pretty sure that a floating point number is always equal to itself, with possibly a strange corner case for things like +/- 0 and NaN.

Exactly. NaN /= NaN.

Other than that, I believe that "let x = ... in x == x" is true (because 
they are the same bitfield by definition), however it is easy to have 
'the same number' without it having the same bitfield representation due 
to loss of precision and the like. To say nothing of failures of other 
laws leading to overflow, underflow, etc.

Live well,

More information about the Haskell-Cafe mailing list