Against PEP 240

Aahz Maruch aahz at
Sun Jun 3 03:56:47 CEST 2001

In article <mailman.991515668.4621.python-list at>,
Tim Peters < at> wrote:
>[Roman Suzi]
>> This said, what is the right way to deal with>currencies in Python
>> right now?
>> Tim Peters's
>> You *probably* want to set the precision to three or four places
>> so that rounding errors don't propagate.
>Hmm.  It's important to note that + and - on FixedPoints never suffer
>rounding errors.  Add up, say, a million dollars-and-cents FixedPoint
>quantities each of precision 2, and the computed result is *exactly*
>correct.  The problems with using binary f.p. in "the naive" way for
>financial calcuations only start with that most dollars-and-cents inputs
>can't be represented exactly; subsequent additions are also subject to
>rounding errors; FixedPoint suffers neither problem.

Right.  I was assuming because of the plural that Roman was likely to
want to do currency conversions, which involves multiplication at the
very least.
                      --- Aahz  <*>  (Copyright 2001 by aahz at

Androgynous poly kinky vanilla queer het Pythonista
Hugs and backrubs -- I break Rule 6

I surf faster than you do, monkey boy.  (My take on Netscape vs. Lynx)

More information about the Python-list mailing list