[Python-Dev] Re: PEP239 (Rational Numbers) Reference Implementation and new issues

Andrew Koenig ark@research.att.com
02 Oct 2002 22:25:07 -0400


Greg> But how long are they going to *stay* small and efficient,
Greg> once you start doing arithmetic on them?

Depends on what kind of arithmetic.

Greg> The problem as I see it is not the magnitude of the number, but
Greg> that the number of significant bits grows without bound, if you
Greg> never throw any of them away.

So I'm suggesting that maybe it won't get bad as quickly if
you keep only the significant bits :-)

Seriously, I don't know whether it would help in practice.
It might be that normalizing rationals from time to time would
be enough.

-- 
Andrew Koenig, ark@research.att.com, http://www.research.att.com/info/ark