mini-gmp mpz_addmul_ui and mpz_submul_ui
Niels Möller
nisse at lysator.liu.se
Wed Apr 17 22:40:29 CEST 2013
Torbjorn Granlund <tg at gmplib.org> writes:
> nisse at lysator.liu.se (Niels Möller) writes:
>
> I'm considering adding mpz_addmul_ui and mpz_submul_ui to mini-gmp.
>
> OK...due to popular demand?
I just added mini-gmp in nettle. I don't use it for the librry itself (I
might make that an option later), but for generating ecc-related tables
at build time. This simplifies cross compilation, since the program in
question is run on the build system, so by using mini-gmp, I get away
without depending on gmp being installed in the build system, and
without any configure tests for figuring out how to link with it.
To do this, I had to replace gmp_printf by calls to mpz_out_str (which
seems unavoidable; I don't want a printf implementation in mini-gmp),
but I also had to replace a call to mpz_submul_ui, which seems easy
enough to implement.
> I have no strong opinion, but we should not forget the meaning of the
> "mini" moniker.
Right. I'm leaning towards the simpler implementation. Avoiding some
temporary storage is not terribly important for the sizes mini-gmp is
intended for.
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