Integer arithmetic

James Gregory james at
Thu Mar 27 12:02:15 CET 2003

On Wed, 2003-03-26 at 10:55, Alex Martelli wrote:
> Daniel Timothy Bentley wrote:
> > Am I so far off in thinking maybe this should be provided by the language?
> IMHO, you are.  "integral types with N bits ignoring overflows"

So wait, all you want to do is algebra in the ring Z_{2^32}?

Assuming this is right, why not just make a RingElement class that has
all the operators overloaded to perform the appropriate operation and
then perform the appropriate modulus. With appropriate optimizations if
needs be.

Sorry, I came in on the end of this, but perhaps this will be helpful.


More information about the Python-list mailing list