This math scares me

Fredrik Lundh fredrik at pythonware.com
Wed Mar 14 16:42:31 EST 2001


Grant Edwards wrote:
> Yes.  All FP calculations took place in BCD.  You got exact results
> as long as your values didn't exceed the representations limits.

the first computer I did any serious programming on (the ABC80,
which together with it's successors dominated the swedish per-
sonal computer scene before the IBM PC arrived) offered "string
arithmetics":

    sum = add$(term, term, precision) ! sub$(), mul$(), div$()

where the arguments were ordinary strings, and the precision
argument was an integer giving the number of decimals if positive,
or number of digits if negative.  no other limitations, except for
available memory (16k total) and user patience (3.58 MHz Z80).

(the ABC80 also offered BCD-based floating point, with 6 decimal
digits in the mantissa and one byte for sign and and exponent...)

Cheers /F





More information about the Python-list mailing list