Support for uintmac_t in GMP

Torbjorn Granlund tg at
Wed Oct 3 12:30:10 CEST 2012

I think we should add a parallel 'uj' function for every 'ui' function
in GMP.  The ui functions accept 'unsigned long', uj functions should
accept uintmax_t.  Similarly, our few si funtions should get an sj

It is not completely clear how to handle mpz_ui_pow_ui.  We have have a
mpz_uj_pow_uj, but should we bother with various combinations of ui and
uj, such as mpz_uj_pow_ui?

I believe mpfr does have uj functions already, and that this defined a
uintmax_t argument.

Arguments of type uj will typically match ui and limb on 64-bit ABIs,
with a few exceptions.  On 32-bit ABIs uj arguments will need two limbs;
on oddball 64-bit ABIs uj arguments will match limbs but be twice as
large as ui arguments.

It might be good to compile uj functions and ui functions from the same
source file.


More information about the gmp-devel mailing list