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

Dennis Lee Bieber wlfraed at
Sat Sep 21 20:32:16 CEST 2002

Paul Rubin fed this fish to the penguins on Friday 20 September 2002 
10:34 pm:

> I do know that financial modelling software I worked on that was sold
> to banks used floating point.  Also, spreadsheets use floating point.
        There's probably a subtle distinction between "modelling" (to me that 
implies something that approximates expected behavior for rapid "what 
if" scenarios) and accounting type applications.
> 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.
        If it is done in COBOL that's pretty much a given... Though most COBOL 
compilers /have/ added things like "usage is computation" -- wherein 
the programmer explicitly has to request a binary value rather than 
normal BCD.

        Though I must be mis-interpreting the book I have -- it implies that 
the default for Fujitsu Cobol v4 is "Display" (8-bit characters), and 
one would have to ask for "packed-decimal" in a usage clause. COMP for 
floating point, and BINARY for integer.

 > ============================================================== <
 >   wlfraed at  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed at     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page:         <
 >            Home Page:             <

More information about the Python-list mailing list