[racket] Decimal rounding problem
On Thu, Nov 29, 2012 at 7:42 PM, Neil Toronto <neil.toronto at gmail.com> wrote:
> On 11/29/2012 10:53 AM, Greg Graham wrote:
>> Now, the unanswered question is why do Crystal Reports and Excel round
>> 4.225 to 4.23? I don't think I'll find as helpful of a forum to answer that
>> question as I have found for Racket. Thanks again for being such a great
>> community!
>
> Aw, you buttered us up so nicely that I have to respond. They're probably
> rounding twice: once to get a decimal number close to the original, and then
> to the specified number of digits.
Looks like that's it. This paper by William Kahan contains a nice
example of the problems of excel rounding:
http://www.cs.berkeley.edu/~wkahan/Mindless.pdf
(the paper is long, the excel example is on page 3)
P.