Decimal arithmetic, was Re: Python GUI app to impress the boss?

Paul Rubin phr-n2002b at
Wed Oct 2 06:17:48 CEST 2002

"Chris Gonnerman" <chris.gonnerman at> writes:
> What, exactly, is wrong with wanting math involving essentially
> decimal monetary amounts to lead to proper decimal rounding?  Paul
> keeps waving bananas in my face.  That's not the problem... since
> time immemorial, grocers have had to handle three-for-a-buck sales.
> They know how they want the math done; and adding some extra
> precision to the intermediate steps solves Paul's complaint.  So why
> does he keep complaining?

I'm told that a certain rounding method might not always produce the
same answer as doing it the "right" way.  So I asked for a deterministic
algorithm for finding the "right" answer in order to compare the results.
So far I haven't gotten that algorithm.  

More information about the Python-list mailing list