[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
precision vs more information
- To: fateman@DALI.BERKELEY.EDU
- Subject: precision vs more information
- From: "George J. Carrette" <GJC@MC.LCS.MIT.EDU>
- Date: Sun, 26 Jan 86 22:20:54 EST
- Cc: common-lisp@SU-AI.ARPA, Moon@SCRC-STONY-BROOK.ARPA
- In-reply-to: Msg of Sun 26 Jan 86 14:13:29 PST from fateman at dali.berkeley.edu (Richard Fateman)
If you go from a floating point number to a ratio you lose information,
the information that the number is an approximation. Exactly how
much of an approximation is hard to tell of course because it depends
on the computational history of the quantity. But the fact that it is
a floating point number can be dangerous information to loose so easily.
This about this:
(defun s (t)
(* 1/2 g (^ t 2)))
The 1/2 has been introduced do to a process of symbolic integration.
Why should it affect the form of the answer to a formula?
Returning a floating point number tells you that the result might
not be the right answer. But with rational arithmetic you can be
sure of getting simply meaningful mathematic results from your