long long support

Marc Glisse marc.glisse at inria.fr
Sun Jan 24 18:25:01 UTC 2021


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...

-- 
Marc Glisse


More information about the gmp-discuss mailing list