[DB-SIG] Re the addition of decimal numbers to python
Bob Gailer
ramrom@earthling.net
Mon, 13 Jan 2003 12:59:43 -0700
--=======2D031787=======
Content-Type: text/plain; x-avg-checked=avg-ok-7DC63855; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit
I too favor adding decimal numbers to Python.
In the older mainframe days the IBM 360 and following computers had an
internal representation called packed decimal; storing 2 hex
representations of decimal digits per byte; the rightmost byte conveyed the
sign. The hardware included instructions for doing arithmetic on packed
decimal, and the PL/I language provided high-level resources for declaring
and manipulating decimal data. Since each digit was represented separately
there was no issue of loss of precision of fractional data.
I have seen several articles discussing various ways of storing deciomal
digits compactly.
But the bottom line is: decimal data can easily be represented as integer
with precision.
As a further aside, at one APL conference there was a discussion about the
value of complex numbers; one man said "I'm an accountant. We certainly can
benefit from imaginary numbers."
Bob Gailer
mailto:ramrom@earthling.net
303 442 2625
--=======2D031787=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-7DC63855
Content-Disposition: inline
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 1/7/2003
--=======2D031787=======--