mpn_perfpow: do we need a special GCD for mp_bitcnt_t?
Niels Möller
nisse at lysator.liu.se
Mon Sep 1 12:32:55 UTC 2014
bodrato at mail.dm.unipi.it writes:
> Using mpn_remove does not solve a little issue, the mixed use of
> mp_bitcnt_t and mp_limb_t. When a prime factor is removed from the
> examined number, the exponent is returned as mp_bitcnt_t, the returned
> value is then casted to mp_limb_t, because we need the GCD of the
> exponents and mpn_gcd_1 wants limbs.
And when can there be a problem? If the mp_limb_t type is smaller than
mp_bitcnt_t? I guess that could happen if configuring with artificially
small limbs, but not otherwise?
Vagely related: We chould have an mpn_gcd_11 function, accepting two
limb-size arguments.
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