tg at swox.com
Fri Sep 19 17:07:15 CEST 2008
Paul Zimmermann <Paul.Zimmermann at loria.fr> writes:
is there any reason why there is no mpz_[cft]div_2exp function in GMP?
Could it be more efficient than the following?
mpz_tdiv_q_2exp (q, n, b);
mpz_tdiv_r_2exp (r, n, b);
I am not sure which function you think is missing.
I believe we have a fairly complete set of functions for division by a
power fo two, with all possible rounding rules.
Perhaps you mean "qr" variants, i.e., mpz_[cft]div_qr_2exp?
We don't have such combined functions since they wouldn't be any faster
than the correspnding separate calls.
More information about the gmp-discuss