[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comparisons between floats and ratios
Subject: Re: comparisons between floats and ratios
I remain unconvinced, and a private note from Cassels also didn't
help. (My mailing system was unable to send to Cassels individually,
so here is a simplified response )
consider (/ (expt 10 68) 1.0E38) .
The numerator overflows when you convert to floating point.
The quotient is representable. I think that CL should err on the
side of slow&correct.
While Cassel's solution to comparisons, by looking at overflows should be ok,
it won't solve the above problem.
Anyone who writes (+ x 1) when he means (+ x 1.0) can be warned or should
pay the cost. Anyone who wants to AVOID conversions to mathematically
reliable answers can easily insist on sloppy floats.