Implementing mpz_addmul_2exp based on mpn_addlsh_n

Albin Ahlbäck albin.ahlback at gmail.com
Sun Jan 30 23:30:49 CET 2022


Hello,

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?

Best,
Albin


More information about the gmp-discuss mailing list