Would someone mind elaborating the explanation in the manual?

Kevin Ryde user42 at zip.com.au
Mon Oct 27 06:18:57 CET 2003


Sisyphus <kalinabears at iinet.net.au> writes:
>
> But if you wanted to see if x was divisible by either 23, 29, or 32 I
> think you would use mpz_divisible_ui() instead ?
>
> I don't know how the speeds compare in that case.

Usually mpz_divisible_ui is less than 2x faster, so the division is
better.

But we should try to make the "modexact" in mpz_divisible_ui available
to applications somehow.  That'd mean the same speed for the bignum
part no matter whether testing one small factor or many.


More information about the gmp-discuss mailing list