Double -> CDouble, realToFrac doesn't work

Marcin 'Qrczak' Kowalczyk qrczak at
Fri Nov 5 04:53:36 EST 2004

ross at 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.

Instead of materializing variants, the function could check isInfinite
etc. - except that these functions are in RealFloat class, not available
for arbitrary Real numbers.

   __("<         Marcin Kowalczyk
   \__/       qrczak at

More information about the Libraries mailing list