Re: Miller-Rabin

2018-03-27 Thread paul zimmermann
Niels, > int > mpz_miller_rabin_uis (mpz_srcptr n, size_t count, unsigned long *bases); this interface would be nice for me. I don't think a bignum base is necessary, unless you use REDC in powm, in which case (for n having at least 2 limbs) it might be faster to use a base b such that

Re: Miller-Rabin

2018-03-26 Thread Niels Möller
paul zimmermann writes: > it would be nice if there would be a GMP function implementing the > Miller-Rabin test, > to have finer control than with mpz_probab_prime_p. There's an internal function mpz_millerrabin, but it also takes a reps argument, not a base. int m

Miller-Rabin

2018-03-26 Thread paul zimmermann
Hi, it would be nice if there would be a GMP function implementing the Miller-Rabin test, to have finer control than with mpz_probab_prime_p. This would allow to get a real primality test for small enough input. For example on https://en.wikipedia.org/wiki/Miller%E2%80