[racket] Decimal rounding problem

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Fri Nov 30 04:02:05 EST 2012

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:


(the paper is long, the excel example is on page 3)


Posted on the users mailing list.