Double -> CDouble, realToFrac doesn't work

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Fri Nov 5 07:53:12 EST 2004


> > Denorms are handled fine by ordinary Rationals, but collapsing all NaNs 
> > down to 0:%0 is not necessarily the right thing to do.
> 
> Yep. Given
>  a % b == c % d     iff    a*d == b*c
> 
> then 0 % 0 is equivalent to each other rational. :-)

Ah!  Not very good.

But that wasn't what I meant.

There's not just *one* NaN - there are 2^53 - 2 distinct ones.  In
fact they all get treated identically, but the bit-patterns are
distinct.

--KW 8-)



More information about the Libraries mailing list