On Wed, Oct 2, 2013 at 5:18 AM, Tom Ellis < tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote: > Are there examples where application programmers would like there so be some > f, a and b such that a == b but f a /= f b (efficiency concerns aside)? I > can't think of any obvious ones.
Yes, and we already handle it properly: Prelude> let f = (1.0 /) Prelude> let (z, negz) = (0.0, -0.0) Prelude> z == negz True Prelude> f z /= f negz True This is *not* an "IEEE Floats are weird" thing. Application programmers want 0.0 to equal -0.0, but -Infinity to not be equal to Infinity. Of course, given how many "IEEE Floats are weird" things there are, you can reasonably consider ignoring this example. <mike
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe