mini-gmp mpz_addmul_ui and mpz_submul_ui

Niels Möller nisse at lysator.liu.se
Wed Apr 17 10:28:21 CEST 2013


I'm considering adding mpz_addmul_ui and mpz_submul_ui to mini-gmp.

This can be implemented either

* in terms of mpn_addmul_1 and mpn_submul_1 (and then I also need the
  additional primitives, mpn_mul_1c and mpn_neg). I have some untested
  code, roughly 120 lines.

* in terms of mpz_mul_ui, mpz_add and mpz_sub, with an additional mpz_t
  temporary. Would be at most 20 lines.

What makes most sense? In any case, testcases are needed too; so I'm not
sure I'll get the time to actually implement it soon.

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