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

Christopher Browne cbbrowne at
Sat Sep 21 09:40:34 EDT 2002

A long time ago, in a galaxy far, far away, Paul Rubin <phr-n2002b at> wrote:
> 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.

Ask yourself:

Q:  When did banks start automating their operations?

(A:  Roughly the 1960s.)

Q:  What were the major language choices at that time?


Q:  Did they use FORTRAN for all their applications?

(A: No, that's for the science people.  Who would do financial apps in

Q:  What sorts of programmers were they looking for to do 
    Y2K remediation work about three years ago, in great

(A:  COBOL, PL/1)

Q: Might these questions suggest any reason to expect that they might
   have been using languages where money, which is their raison
   d'etre, might have been expressed in BCD?

Can you suggest languages that would be widely used in an MVS
environment that WOULDN'T include BCD arithmetic?  

I would expect that even C for S/390 would include a BCD arithmetic
language extension, because BCD gets used /everywhere/ on MVS-based
systems, and that is the classic OS platform of banking.
(concatenate 'string "aa454" "")
"Not  only do  I  strongly recommend  against  using PC  NFS, but  I'm
willing to  bet you won't  find anyone willing  to code a free  PC NFS
client.   I  bet even  Richard  Stallman would  charge  for  a PC  NFS
client."  -- Steve Conley <sconley at>

More information about the Python-list mailing list