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

Paul Rubin phr-n2002b at
Sat Sep 21 01:34:10 EDT 2002

Christopher Browne <cbbrowne at> writes:
> REALITY CHECK for a moment.
> What do you think A Real Live bank uses to compute interest?

If I had to guess, I'd guess they use floating point.

I do know that financial modelling software I worked on that was sold
to banks used floating point.  Also, spreadsheets use floating point.

But it's possible (likely even) that some bookkeeping applications use
BCD.  One that I worked on actually used exact, multi-precision
rational arithmetic, but I think that's unusual.

Note that the x86/x87 still supports BCD arithmetic in microcode.  In
reality, though, programs that use BCD to keep track of money don't do
all that much arithmetic, so software emulation is plenty fast enough.

More information about the Python-list mailing list