A question about mpz_out_str and mpz_out_raw output limitation

Nikitin Kirill kirill.nikitin at epfl.ch
Mon Jun 23 10:15:43 UTC 2014


Dear all,

I'm currently working with large sets of public-key moduli using gmp-6.0.0 for arbitrary precision arithmetic. There is a need to multiple all unique primes from moduli together so final number is getting huge sometimes (the sets sometimes include about 10 000 000 moduli).
I have encountered a problem that mpz_out_raw has a limitation for printing numbers to a file, precisely 2^31 bytes (mpz_inp_raw has the same accordingly). When numbers are bigger, the output is wrong (maybe shrunken). Therefore, I'm wondering if it is possible to remove this limitation in some way? and whether mpz_out_str (mpz_inp_str) has the same limitation?
Please correct me if I'm wrong at some point. Thank you for any help!

Kirill


More information about the gmp-discuss mailing list