Double -> CDouble, realToFrac doesn't work

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Fri Nov 5 07:29:05 EST 2004


> On Fri, Nov 05, 2004 at 10:53:36AM +0100, Marcin 'Qrczak' Kowalczyk wrote:
> > ross at soi.city.ac.uk writes:
> > > [The proposal is to add 0:%0, 1:%0 and -1:%0 to Rational.]
> > >
> > > Changing Rational from meaning rational numbers would also be bad.  I'd
> > > prefer to redefine realToFrac to go through a new type that is the union
> > > of Rational and these values.
> > 
> > It's not enough if you care about preserving -0.0.
> 
> True, and denormalized values (whatever they are).

Denorms are handled fine by ordinary Rationals, but collapsing all NaNs 
down to 0:%0 is not necessarily the right thing to do.

Surely we should add another fractional type, like Rational but with some extra stuff to make it a superset of Double.

--KW 8-)
-- 
Keith Wansbrough <kw217 at cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.



More information about the Libraries mailing list