"Fixed precision" integers

Jim White mathimagics at yahoo.co.uk
Wed Aug 29 17:18:55 CEST 2007


> From: point14 at magma.ca

> the least significant bits are to roll over,


Ok, you're talking about doing all arithmetic in
integers mod 2^n,  for some fixed n.

That's a different kettle of fish - I think you have
little choice but to use mpz_t's and wrap the basic
operators mpz_add,mul etc in routines that monitor the
size of the results and which do the modular reduction
when necessary

This is not something I've done myself - perhaps other
list members might have better ideas. 


Cheers

Jim White
ANU


More information about the gmp-discuss mailing list