long long support

Hans Åberg haberg-1 at telia.com
Sun Jan 24 19:48:19 UTC 2021

> On 24 Jan 2021, at 19:25, Marc Glisse <marc.glisse at inria.fr> wrote:
> On Sun, 24 Jan 2021, Torbjörn Granlund wrote:
>> Marc Glisse <marc.glisse at inria.fr> writes:
>> The main issue is that support for long long is missing in GMP itself
>> (the C part). And it is missing because GMP is still officially a C89
>> library. There are plans to move it to C99, but I don't think the work
>> to add long long has been done yet. The main platform where long long
>> support would be beneficial is win64 because of their weird choice of
>> 32-bit long (although it would still be nice on other platforms).
>> I have a patch which I made several years back, adding long long mpz,
>> mpq, and mpf functions using an _uj suffix.  I intend to finish that
>> patch for GMP 7.
> Oh, indeed, you already mentioned that patch last year.
> The most recent discussion on the topic was https://gmplib.org/list-archives/gmp-bugs/2020-June/004771.html
> with in particular the question of what types to support exactly (long long, intmax_t, int128_t, etc). Too bad this isn't C++, using a template for the argument of mpz_set_sj would make the discussion unnecessary ;-) Actually, we could support more types in gmpxx than gmp...

There is a summary here for the C98/C++11 fundamentals types:

The fixed width integer types types are just typedefs to the other types, so it would seem you do not have add specific support for those:

More information about the gmp-discuss mailing list