Maximum number of bits in an mpz_t

Torbjorn Granlund tg at swox.com
Sun Apr 25 22:53:38 CEST 2004


Roberto Bagnara <bagnara at cs.unipr.it> writes:

  I would like to know what the theoretical limit is,
  in an architecture independent way (no matter how funny
  an architecture may be), and not looking at the contingent
  implementation of the library.
  
For mpz, mpq, and mpf, I think we support results up to 2^31-1
limbs or 2^ULONGBITS-1 bits, whichever is smaller.  In the next
major release (gmp 5.0) we should allow larger numbers with
64-bit computers at the mpn level (roughly 2^50 limbs).  A
multiplication on a high-end machine using such large operands
would need about 100 million years, which suggests that it should
be sufficient for some years to come...

-- 
Torbjörn


More information about the gmp-discuss mailing list