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

Cameron Laird claird at lairds.com
Mon Oct 14 20:23:49 EDT 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 ...
>
>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: 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
available memory.

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

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html



More information about the Python-list mailing list