Re: mini-gmp: mpz_congruent_p and mpz_probab_prime_p

2014-03-12 Thread Niels Möller
bodr...@mail.dm.unipi.it writes: I changed the check_small function in the mini-gmp/tests/t-pprime_p.c file you just pushed to: for (i = 0; i 25005200; i++) { mpz_set_si (n, i); check_one (n, isprime (i)); } It passed. How long did that take? This means that

Re: mini-gmp: mpz_congruent_p and mpz_probab_prime_p

2014-03-12 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: if (reps 25 mpz_cmpabs_ui (n, 5000*5000+5000 + 41) 0) reps = 25; else if (reps 5000) reps = 5000; I didn't follow this thread too closely, but that code seems to suggest that an argument of 5000 makes sense. Even the most

Re: mini-gmp: mpz_congruent_p and mpz_probab_prime_p

2014-03-12 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: I didn't follow this thread too closely, but that code seems to suggest that an argument of 5000 makes sense. I don't think it makes much sense. But I'd like to make sure that mpz_probab_prime_p returns 1 also in the case case a user passes a prime of