Alternative to Decimal type

Grant Edwards grante at visi.com
Thu Jun 12 16:11:56 CEST 2008


On 2008-06-12, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:

> If you were to follow the footsteps of COBOL, you'd be using
> BCD internally, with a special code to represent the decimal
> point (and maybe, to save space, the sign too)
>
> Old mainframes had instructions to work with packed BCD as a
> register format (the Xerox Sigma series used four 32-bit
> registers to represent a 31 digit packed BCD number). Okay, I
> think even the Pentium's still have a BCD operation set,

IIRC, most general purpose microprocessors I've used had
special instructions to make packed BCD operations easier, and
back in the day (when Pascal was much more popular than C)
compilers for microprocessors usually offered a BCD floating
point data type.

-- 
Grant Edwards                   grante             Yow! The SAME WAVE keeps
                                  at               coming in and COLLAPSING
                               visi.com            like a rayon MUU-MUU ...



More information about the Python-list mailing list