Comment on PEP-0238

Emile van Sebille emile at fcfw.fenx.com
Tue Jul 10 22:08:51 EDT 2001


That shouldn't affect what I'm after.  I've managed to put together a python based simple implementation that does add, subtract,
multiply and divide so far, though no negatives yet.  As I work through that, I'm considering how this may/should impact things so I
can flesh out a potential PEP.  Maybe by next week or so.

Now if only the customers would cooperate and stop giving me new projects so I can get some time...

Emile van Sebille
emile at fenx.com

---------
----- Original Message -----
From: "Bill Janssen" <janssen at parc.xerox.com>
To: "Guido van Rossum" <guido at python.org>; <emile at fenx.com>
Cc: <python-list at python.org>
Sent: Tuesday, July 10, 2001 6:44 PM
Subject: Re: Comment on PEP-0238


> Actually, if you're going to go in this direction, why not do what I
> proposed for HTTP-NG, which is to use a "denominator" rather than a
> decimal precision?  The denominator implicitly specifies the precision.
>
> So, if I want two decimal places, I specify "denominator 100", which
> mean that the result will be figured in hundredths.  This easily
> allows one to work in 16ths, 3rds, or other fractional amounts.
>
> >>> denominator 100
> >>> print 2/7        #-> 0.28
> >>> denominator 7
> >>> print 2/7        #-> 0.285714285714...
>
> This is, of course, just another use of rationals, since the
> denominator used must be stored with each value.
>
> At the very least, if you use "precision" to mean decimal precision,
> use "decimal_precision".
>
> Bill
>
>





More information about the Python-list mailing list