[Tutor] Re: Dynamic decimal size

Magnus Lycka magnus@thinkware.se
Wed Mar 5 20:18:01 2003


>pan schrieb:

First of all, pan: Please post in ASCII to the mailing list.
Your mails just look like garbage in the digests and archives:
See http://mail.python.org/pipermail/tutor/2003-March/021156.html

> > I am trying to code a numeric class in which some float numbers,
> > like 4.25790321, will be stored with varying decimal sizes as:

Since I can't read your mail I'm not sure what you want, but maybe
you are after something like: http://fixedpoint.sourceforge.net/

There are a number of decimal/fixed point/rational libraries for
python. Please don't write one more. Use (and maybe improve/extend)
one of the current instead. There is an effort underway, to include
something like this in the standard library, but there is some
reluctance. FixedPoint was written by Tim Peters and he's not
willing to do what is needed to get it included in the std lib.
Some others have said they would, but I'm not sure it's fully done,
and Tim has said that he'd prefer to see an implementation that fully
follows Mike Cowlishaw's proposal at www2.hursley.ibm.com/decimal/ .




-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se