Problem with large values in GMP...

Torbjörn Granlund tg at
Tue Mar 22 18:38:15 UTC 2016

Vincent Lefevre <vincent at> writes:

  On 2016-03-17 19:06:58 +0100, Torbjörn Granlund wrote:
  > Vincent Lefevre <vincent at> 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.  :-)
  The use of an int should be documented.

We intensionally do not document the mpz, mpq, or mpf structure types.

The various limits of documented functions would be nice to document,
i.e. that most functions have the limit 2^37 bits for machines with
64-bit limbs running a 64-bit ABI, or 2^36 bits with a 32-bit limbs, and
finally 2^32 bits for ILP32 machines.  And then the ugly limits of some
I/O functions and functions with a bit count interface in the middle

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list