Problem with floating point precision

Tim Peters tim.peters at
Wed Aug 18 05:45:23 CEST 2004

[John Roth]
> ...
> There's a floating decimal package in 2.4 that is intended
> to eventually (in 2.5 maybe?) be the base of a currency
> package. However, that doesn't help today.

It will help in 2.4, though.  Fixed-point decimal is a subset of what
2.4's decimal arithmetic can do, and it's dead easy to do exact
"dollars and cents" calculations using it.  I'm not sure what a
currency package would add on top of it -- maybe add currency markers
to string output, perhaps offer a simplified rounding discipline for
multiplication, not really sure.  The "hard parts" will already be in

More information about the Python-list mailing list