proposed language change to int/int==float (was: PEP0238 lament)
David Eppstein
eppstein at ics.uci.edu
Wed Jul 25 16:45:55 EDT 2001
In article <slrn9lu6hc.4ua.wtanksle at dolphin.openprojects.net>,
wtanksle at dolphin.openprojects.net (William Tanksley) wrote:
> Perhaps the best solution would be to make Python's integers actually be
> the field of integers mod 4294967291 (not too much of a change -- they're
> currently very similar to the integers mod 4294967295). The best of all
> worlds -- divisions no longer have remainders, and everything's exact
> again.
If you instead used the ring of integers mod 2^32, you could still divide
by any odd number exactly, without remainders. Division by even numbers
would be harder, but everyone optimizes those by replacing them with
shifts, right?
I think even fewer people would like the results of division in these
systems, though -- e.g. what is 1/3?
> and-writing-the-log-function-becomes-a-lot-more-fun-ly yr's
For mod 2^32, I think what you want is the 2-adic norm...
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list