mpz_out_str seg fault with large number = bug?

viny@adinet.com.uy viny at adinet.com.uy
Thu Aug 4 02:56:07 CEST 2005


>  
>  Is there any documentation about the admisible range of those functions?
>  
>Please see http://swox.com/gmp/#FAQ.
>
>-- 

Torbjörn:

After checking the FAQ, I hit the following sentence in the future releases
section 

"Support at the mpn and mpz levels for operands of up to 2^56 bits (on 64-bit
machines). Current limits are: on 32-bit machines, 2^31 bits; on 64-bit machines,
2^37 bits". 

Mine is a 32 bit, so the mpz_fac_ui should work fine up to 2^31 aprox 10^9
which is greater than 10^7.
And my problem happens at 10^7 for mpz_fac_ui while for mpz_out_str it seg
faulted with 10^6.


Thanks for the quick answer.
   Vincent




More information about the gmp-discuss mailing list