[Haskell-cafe] Re: Double -> CDouble, realToFrac doesn't work

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Fri Nov 5 08:57:46 EST 2004

On Fri, 5 Nov 2004, Robert Dockins wrote:

> What IEEE has done is shoehorned in some values that aren't really 
> numbers into their representation (NaN certainly; one could make a 
> convincing argument that +Inf and -Inf aren't numbers).

I wonder why Infinity has a sign in IEEE floating processing, as well as
0. To support this behaviour uniformly one would need a +0 or -0 offset
for each number, which would lead straightforward to non-standard analysis

Prelude> 1/0.0
Prelude> -1/0.0
Prelude> -0.0
Prelude> 1.0-1.0
Prelude> -(1.0-1.0)

Thus (a-b) is not the same as -(b-a) for IEEE floats! 

More information about the Glasgow-haskell-users mailing list