Decimal arithmatic, was Re: Python GUI app to impress the boss?
Terry Reedy
tjreedy at udel.edu
Wed Oct 2 09:05:35 EDT 2002
>>> OK, so don't use whole pennies (or smallest currency) as your
>>> base, use 10,000ths of a penny, but still use integer arithmetic
>>> for your calculations.
>> Normal Integers aren't big enough. 2^31 / 10K == 215K.
>That's why you want double-floats. 2^53 / 10K = 900G
Or 64 bit integers. AMD has just announced new series of 64 bit chips
initially aimed at server market but ultimately at desktops. I
suspect that such will be common by 2010.
TJR
More information about the Python-list
mailing list