[libmath-prime-util-perl] 07/16: Update MR bases

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:46:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.19
in repository libmath-prime-util-perl.

commit 26f73ce7d184bc25c46e6ccbf48825b9528cf18c
Author: Dana Jacobsen <dana at acm.org>
Date:   Thu Jan 17 23:17:17 2013 -0800

    Update MR bases
---
 Changes                   |  4 ++++
 examples/find_mr_bases.pl |  3 ++-
 factor.c                  | 12 ++++++------
 lib/Math/Prime/Util.pm    |  2 +-
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/Changes b/Changes
index ff596b5..f4973f4 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl extension Math::Prime::Util.
 
+0.19  ?? January 2012
+
+    - Update MR bases.
+
 0.18  14 January 2012
 
     - Add random_strong_prime.
diff --git a/examples/find_mr_bases.pl b/examples/find_mr_bases.pl
old mode 100644
new mode 100755
index 5eeaeac..2d1e078
--- a/examples/find_mr_bases.pl
+++ b/examples/find_mr_bases.pl
@@ -31,7 +31,7 @@ for my $n (3 .. 1000000) {
 
 # Parallel:
 my $maxn :shared;
-my $start = 1;  # People have mined below ~ 2^52
+my $start = int(2**59+2**41);  # People have mined below 2^55
 $maxn = 2047;
 my $nextn = 2049;
 my @threads;
@@ -83,3 +83,4 @@ base 42162995 good up to 97921
 2012-07-02  base 64390572806844 good up to 161701
 2012-10-15  base 1769236083487960 good up to 192001
 2012-10-17  base 1948244569546278 good up to 212321
+2013-01-14  base 34933608779780163 good up to 218245
diff --git a/factor.c b/factor.c
index a032cbe..8cad533 100644
--- a/factor.c
+++ b/factor.c
@@ -208,13 +208,13 @@ int _XS_is_prob_prime(UV n)
   }
 #else
 #if 1
-  /* Better bases from:  http://miller-rabin.appspot.com/ */
-  if (n < UVCONST(212321)) {
-    bases[0] = UVCONST(1948244569546278);
+  /* Better bases from http://miller-rabin.appspot.com/, 15 Jan 2013 */
+  if (n < UVCONST(218245)) {
+    bases[0] = UVCONST(34933608779780163);
     nbases = 1;
-  } else if (n < UVCONST(360018361)) {
-    bases[0] = UVCONST( 1143370    );
-    bases[1] = UVCONST( 2350307676 );
+  } else if (n < UVCONST(466758181)) {
+    bases[0] = UVCONST( 91869414    );
+    bases[1] = UVCONST( 6346128598129234 );
     nbases = 2;
   } else if (n < UVCONST(105936894253)) {
     bases[0] = 2;
diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index ad82c3f..ba75b62 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -2493,7 +2493,7 @@ strong prime I<p> to be one where
 
 =over
 
-=item * I<p> is large.   This function uses 128 as a minimum.
+=item * I<p> is large.   This function requires at least 128 bits.
 
 =item * I<p-1> has a large prime factor I<r>.
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git



More information about the Pkg-perl-cvs-commits mailing list