[Haskell-cafe] Re: Why purely in haskell?
Luke Palmer
lrpalmer at gmail.com
Fri Jan 11 10:06:19 EST 2008
On Jan 11, 2008 9:27 AM, Wolfgang Jeltsch <g9ks157k at acme.softbase.org> wrote:
> However, the fact that (0 / 0) == (0 / 0) yields False is quite shocking. It
> doesn't adhere to any meaningful axiom set for Eq. So I think that this
> behavior should be changed. Think of a set implementation which uses (==) to
> compare set elements for equality. The NaN behavior would break this
> implementation since it would allow for sets which contain NaN multiple
> times.
Here's another thing that makes me want to throw up.
Prelude> let nan :: Double = 0/0
Prelude> compare nan nan
GT
Prelude> nan > nan
False
Luke
More information about the Haskell-Cafe
mailing list