mpz_probab_prime_p(n, reps) : how long?

Richard B. Kreckel kreckel at ginac.de
Fri Mar 11 11:19:06 CET 2005


On Fri, 11 Mar 2005, jojo 29 wrote:
> Someone wrote me that my mpz_probab_prime_p() function (33 million digits
> number, 10 iterations) needs few months only, with a Pentium 4. So... I
> don't know who is right...

Both.

> What calculations did you make to determine that my mpz_probab_prime_p()
> function needs "100 years"?

Have you considered that the discrepancy might be due to two different
algorithms?  They're not using the generic Miller-Rabin test in GIMPS.
They use Lucas-Lehmer augmented by Crandall's irrational-base discrete
weighted transform.

Regards
  -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the gmp-discuss mailing list