[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
floating point question
- To: David Bein <pyramid!bein@SRI-UNIX.ARPA>
- Subject: floating point question
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Sun, 19 Jan 1986 23:57:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 19 Jan 1986 17:55-EST from David Bein <pyramid!bein at sri-unix>
- Sender: FAHLMAN@C.CS.CMU.EDU
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.