Decimal arithmatic, was Re: Python GUI app to impress the bos s?

Cameron Laird claird at
Tue Oct 15 02:23:49 CEST 2002

In article <mailman.1032997934.805.python-list at>,
Delaney, Timothy <tdelaney at> wrote:
>It's called Fixed Point arithmetic, and strangely enough, Tim Peters wrote
>an excellent implementation ...
>Tim Delaney

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: >.  For a useful range of
data, these occupy *less* space than "normal" computer-
encoded numbers, and exhibit precision limited only by
available memory.

The URL above gives the most straightforward implementation.
Myself, I like a variant which encodes rational arithmetic ...

Cameron Laird <Cameron at>

More information about the Python-list mailing list