[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
floating point question
I'm not sure why you are asking me specifically about this. Of all the
people on the Common Lisp mailing list, I'm probably the one who cares
the least about the fine points of floating-point roundoff hackery and
related mathematicalia. But anyway...
It is well known that floating point numbers are mere approximations to
mathematical truth, due to roundoff error. So I see no paradox here.
No Common Lisp ratio is strictly equal to zero (else it would be reduced
to an integer), but it is quite possible to have one whose closest
approximation in the domain of short-floats is 0.0. So what? There are
an infinite number of other examples where, due to roundoff, two arithmetic
expressions that are supposed to lead to identical results in fact
produce slightly different floating point numbers. No paradox, just the
result of dealing with an approximation.
-- Scott