[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rounding on output
- To: Fahlman%CMU-CS-C@SU-DSN, Cassels%SCRC-TENEX%MIT-MC@SU-DSN
- Subject: Rounding on output
- From: Robert A. Cassels <Cassels%SCRC-TENEX%MIT-MC@SU-DSN>
- Date: Fri, 17 Jun 1983 23:25:00 -0000
- Cc: Common-Lisp@SU-AI
- In-reply-to: The message of 16 Jun 83 20:59-EDT from Scott E. Fahlman <Fahlman at CMU-CS-C>
Date: Thu, 16 Jun 1983 20:59 EDT
From: Scott E. Fahlman <Fahlman@CMU-CS-C>
Do we really have to lay down complicated rules for rounding of printed
flonums in the white pages? I can't believe that all of these marginal
cases matter. Why don't we just say that the results are supposed to be
rounded appropriately and let the implementors worry about overflow
conditions and how to break ties and what is done with the last bit.
What happens on ties hardly matters, since there is only one value of
exponent for which ties can occur.
In general, I agree that accuracy in printing isn't so important.
But there are enough strange behaviors when you drop a few bits
that I believe it's worth the trouble. If Common Lisp is to be
used for any sort of serious mathematical work, any rigor we can
introduce will be appreciated down the road. Why stop with
I would certainly like the reader to be accurate. Otherwise it's
a real pain to write approximation routines with nice properties
-- like monotonicity. Are we to be reduced to writing octal
constants just to be sure that all the bits are right?
How do you write PI (which is supposed to be "the best possible
approximation") in a machine-independent manner?