Problem with large values in GMP...

Torbjörn Granlund tg at gmplib.org
Thu Mar 17 18:06:58 UTC 2016


Vincent Lefevre <vincent at vinc17.net> writes:

On 2016-03-17 18:19:27 +0100, Torbjörn Granlund wrote:
  > We use "int" for the limb count in mpz_t; code manipulating that should
  > not try to set values which do not fit.
  
  Why an int and not a long?

Please resend this message in 1991.  :-)

We have some plans of allowing a greater range without making the mpz
object much larger.  The idea is that allocation does not need very fine
granularityu, so we can steal some of the (32) bits from the _mp_alloc
field.  But _mp_size needs to be exact, so the stolen bits alloc field
will go to to _mp_size.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list