Ciao Fredrik,

Il 2022-05-25 22:48 Fredrik Johansson ha scritto:
Now that mpn_mul no longer dispatches to mpn_sqr, the squaring
optimization is missing in mpz_addmul/mpz_submul.

Thanks for spotting this!

    mpz_addmul(sum, a, a);

This should be easy to fix.

It is. I fixed it with a small patch.
https://gmplib.org/repo/gmp/rev/61ef108d740c

But I had to also add that case to the test program.
The case mpz_addmul(sum, a, a); was correctly handled,
but it wasn't tested.

And the case mpz_addmul(x, x, x); keeps on being untested!

Ĝis,
m

--
http://bodrato.it/papers/
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to