Implementing mpz_addmul_2exp based on mpn_addlsh_n
Torbjörn Granlund
tg at gmplib.org
Mon Jan 31 00:18:55 CET 2022
Albin Ahlbäck <albin.ahlback at gmail.com> writes:
I noticed that there are undocumented functions mpn_addlsh_n and
mpn_rsblsh_n in GMP, and I was wondering if there is any possibilities
to add corresponding mpz functions in the lines of:
void
mpz_addmul_2exp(mpz_t rop, const mpz_t op1, mp_bitcnt_t op2)
Set rop to rop + op1 times 2 raised to op2.
Would this be possible? If not, would it be possible to document and
"uncover" these functions so that one can utilize these mpn functions
with confidence?
These functions are optional and used internally only if available.
Since they might not be in every GMP build they cannot be made
user-visible.
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-discuss
mailing list