Decimal arithmatic, was Re: Python GUI app to impress the bos s?
claird at lairds.com
Tue Oct 15 02:23:49 CEST 2002
In article <mailman.1032997934.805.python-list at python.org>,
Delaney, Timothy <tdelaney at avaya.com> wrote:
>It's called Fixed Point arithmetic, and strangely enough, Tim Peters wrote
>an excellent implementation ...
Someone who wants to pursue this, and likes the motivation
of a change to improve on the timbot, might consider a
Pythonic implementation of so-called "adaptive integers"
<URL: http://wiki.tcl.tk/4329 >. For a useful range of
data, these occupy *less* space than "normal" computer-
encoded numbers, and exhibit precision limited only by
The URL above gives the most straightforward implementation.
Myself, I like a variant which encodes rational arithmetic ...
Cameron Laird <Cameron at Lairds.com>
More information about the Python-list