test if an unsigned long fits in a limb.

Niels Möller nisse at lysator.liu.se
Tue Mar 6 21:47:45 CET 2012


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

> Note that mpir is replacing signed/unsigned long by two typedefs that
> can be defined as (unsigned) long long on _LONG_LONG_LIMB platforms.
> That works around the problem too...

But the point of the _ui and _si functions, as I understand them, is to
make it safe and easy to pass values between code using GMP and code
which is unaware of GMP types.

One can have alternative functions accepting mp_limb_t and
mp_limb_signed_t, if one finds that useful. But for the above reason,
advertising such functions as a substitute for the _ui and _si functions
seems to totally miss the point.

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