No it's 2^37 on a 64 bit machine. This is due to the 32 bit type used
for the limb count in the mpz_t struct.

If you want to use larger integers, use the mpn functions as I explained.

On Tue, 27 Oct 2020 at 05:58, Gaj Satha <gaj.sa...@gmail.com> wrote:
>
> Is it correct in saying that these limits (41 billion) is related to 
> sizeof(int) = 4?
>
> My machine has sizeof(int) = 8, so I can allocate much more than 4GB using 
> malloc. Will I still suffer from this limit of I can go much beyond it?
>
>
> On 3/10/20 1:57 AM, 'Bill Hart' via mpir-devel wrote:
>
> The limits in MPIR are the same.
>
> In order to get around the limit, you can use the mpn layer of functions.
>
> On Tue, 10 Mar 2020 at 09:56, Gaj Satha <gaj.sa...@gmail.com> wrote:
>>
>> Hi:
>>
>> Are there any limits on the size of mpz_t in MPIR (Other than availble 
>> memory)?
>>
>> I came to know that GNU GMP had limit of 41 billion on mpz_t sometime back 
>> (as per https://gmplib.org/list-archives/gmp-discuss/2016-July/006013.html), 
>> which they plan to remove but I don't know if it has been removed.
>>
>> Please let me know. I need to calculate digits to 50 trillion.
>>
>> Gaj
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "mpir-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mpir-devel+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/mpir-devel/6a7df5d9-d3cb-451e-a249-d8ec5c309c21%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mpir-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/mpir-devel/CAB0xFntteZYVVGSeK0UKe-hch8p%3DG25Oczp6_B2Jm-_segyQKg%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mpir-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/mpir-devel/b4a3cdaf-ee75-a07b-2d48-314c2f3ed241%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mpir-devel/CAB0xFnuh6pjhyrQyMoRJzy5N7t7G1GHiaULtnou7P_8o71pOFQ%40mail.gmail.com.

Reply via email to