mp_size_t

cents2823 at yahoo.co.jp cents2823 at yahoo.co.jp
Wed Oct 13 03:38:21 UTC 2021


Hi,
The following report shows how to extend the number of mpz_t(and mpf_t) to 2 ^ 63-1 lims.
Please also refer to this.
The report:
Expand gmp number and I calculated pi 121 billion digits(2021/4 gmp-discus Archive)
Susumu Tsukamoto
On Tue, Oct 5, 2021 at 9:13 AM Tomás Oliveira e Silva <tos at ua.pt> wrote:
>
> I very recently did a computation requiring integers of potentially
> extreme large size using gmp 6.2.1.
> Unfortunately, the program was terminated early due to overflow in the
> mpz type.
>
> Reading the 6.2.1 documentation (page 18, version 6.2.1) I was expecting
> the number of limbs to be stored in a field of type mp_size_t.
> To my surprise that is not so. In gmp.h (and gmp-h.in) both _mp_alloc
> and _mp_size are plain integers (int data type).
> That probably makes it much harder for someone without intimate
> knowledge of the inner workings of the library to compile a custom
> version of the library where those fields are longs, and, more
> importantly, to have confidence that the now long sizes are handled
> correctly in all places.
>
> Any ideas about to address this particular problem? For my problem,
> 2^{31}-1 limbs are not enough...
>
> --
> TOS
>
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss


More information about the gmp-discuss mailing list