[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

comparisons between floats and ratios

Is (> a-rational a-float) supposed to err out when (float a-rational a-float)
would overflow?  If so, there should at least be some way to tell ahead of time
if that's going to happen, for people who want to write a more careful
comparison routine.  The only way I can figure out of doing this now is
(> a-ratio (rational most-positive-xx-float)).  Consing up a bignum
representation of the largest float seems like a high price to pay for being

Since most floating point implementations can (internally at least) represent
infinity, it shouldn't cause a great loss of efficiency to require that this
case return T. 

A not-entirely-unrelated question:  What kind of rounding is FLOAT supposed
to do?