[Haskell-cafe] Re: Why purely in haskell?
ketil+haskell at ii.uib.no
Fri Jan 11 05:33:01 EST 2008
Wolfgang Jeltsch <g9ks157k at acme.softbase.org> writes:
> However, the fact that (0 / 0) == (0 / 0) yields False is quite shocking. It
> doesn’t adhere to any meaningful axiom set for Eq.
Tough luck, but that's how floating point works, and what the
numericalists know, and possibly even love (although I have my
doubts). Sanitizing this behavior would make Haskell less usable for
real-world numerical problems.
As a compromise, what about an option to make NaN (and presumably the
infinities) cause an immediate exception? (And, cetero censeo,
exceptions for Int overflow as well.)
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe