mp_bitcnt_signed_t

Niels Möller nisse at lysator.liu.se
Sat Aug 22 12:21:55 UTC 2015


Marc Glisse <marc.glisse at inria.fr> writes:

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

If it's really non-negative, I think I'd prefer the unsigned
mp_bitcnt_t. I don't think consistency with mpf (deprecated) is
important.

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

As I understand it, the main point of those interfaces is to support
plain unsigned long (or signed long). Then I think a new typedef is more
confusing than clarifying.

(I don't have a very strong opinion on any of these points).

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list