Performance mpz_divexact / mpz_divexact_ui

Paul Zimmermann Paul.Zimmermann at
Sun Jan 16 21:21:36 CET 2022

       Dear Simon,

> * Do you have any other suggestions on improving the code shown above?

I would first compute the 2-valuation using mpz_scan1 for example, and
then try to divide by 5^k, with k bounded by the 2-valuation.

Best regards,
Paul Zimmermann

More information about the gmp-discuss mailing list