diff options
author | tege <tege@gmplib.org> | 2005-10-31 23:49:46 +0100 |
---|---|---|
committer | tege <tege@gmplib.org> | 2005-10-31 23:49:46 +0100 |
commit | 2c2b1241ebe73024e720540e41e52f8b0bbd3c15 (patch) | |
tree | 048371828769071f759a23a17194c06961700f77 | |
parent | 7e9b44de298febb6d2bbb0e6975c626a8f2a47a6 (diff) | |
download | gmp-2c2b1241ebe73024e720540e41e52f8b0bbd3c15.tar.gz |
(mpz_probab_prime_p): Considerably limit trial dividing.
-rw-r--r-- | mpz/pprime_p.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/pprime_p.c b/mpz/pprime_p.c index 618be98c6..45ffe0358 100644 --- a/mpz/pprime_p.c +++ b/mpz/pprime_p.c @@ -106,7 +106,7 @@ mpz_probab_prime_p (mpz_srcptr n, int reps) nprimes = 0; p = 1; - ln2 = mpz_sizeinbase (n, 2) / 30; ln2 = ln2 * ln2; + ln2 = mpz_sizeinbase (n, 2); /* FIXME: tune this limit */ for (q = PP_FIRST_OMITTED; q < ln2; q += 2) { if (isprime (q)) |