[Haskell-cafe] Re: 0/0 > 1 == False
Ketil Malde
ketil+haskell at ii.uib.no
Fri Jan 11 05:17:22 EST 2008
Achim Schneider <barsoap at web.de> writes:
>> You need to use the / operator, if you want to do floating-point
>> division.
> Yes, exactly, integers don't have +-0 and +-infinity... only
> (obviously) a kind of nan.
No, failure (exception, bottom) is different from NaN, which is just
another value in the domain - admittedly one which behaves rather
strangely.
> Said differently: I don't know a thing about floats or numerics.
Perhaps it helps to think of floating point values as intervals? If +0
means some number between 0 and the next possible representable
number (and similar for -0), it may make more sense to have 1/+0 and
1/-0 behave differently.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe
mailing list