On Eq, was Re: [Haskell-cafe] When to use fancy types [Re: NumberTheory library]

ajb at spamcop.net ajb at spamcop.net
Fri May 13 21:32:04 EDT 2005


G'day all.

Quoting Jacques Carette <carette at mcmaster.ca>:

>  From what you argue above, and reading the IEEE 754 standard correctly,
> instance Eq Float and instance Eq Double
> should be *removed* !

You could also argue that a function which distinguishes between +0 and -0
doesn't respect "semantic equality" of Float and Double.  Your task, should
you choose to accept it, is to define what the semantics of equality
actually are for IEEE 754 floats. :-)

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list