Marc Glisse marc.glisse at
Sat Aug 22 06:36:54 UTC 2015


mpz_get_d_2exp and mpf_get_d_2exp currently take as argument a long*. 
Since we introduced a type mp_bitcnt_t, I guess it would make sense to add 
mp_bitcnt_signed_t and use it there. Any objection?

For the mpz case, the answer should always be nonnegative, so we could use 
an unsigned type if we wanted, but I guess it is better to keep the 
current signed type, which is consistent with the mpf case.

What do you think of introducing 2 typedefs mp_builtin_[su]i (or 
mp_native_[su]i or gmp_[su]i or whatever) and using them in all the 
functions with _si or _ui in their name ? Just trying to clarify why each 
type is used (unsigned long is mp_bitcnt_t in some places, mp_builtin_ui 
in others, etc).

Marc Glisse

More information about the gmp-devel mailing list