fixed size integer arithmetic

point14 at point14 at
Wed Aug 29 05:22:52 CEST 2007


Is it possible in GMP to have the size of integers (like mpz_t) to be 
fixed in size and invariant (eg, a fixed number of bits) as well as being 
arbitrarily large?

I mean once it's declared or initialized to be of a certain size, the size 
no longer changes, and arithmetic operations (add, mul, etc) that would 
normaly grow the number would simply cause it to roll over.

Is this possible with GMP and if not, do you have suggestions?


More information about the gmp-discuss mailing list