[libmath-prime-util-perl] 04/15: Speed up primality proof tests on non-64-bit machines

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


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

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

commit c50f3800d0bbd3cbae694efc18e720f21d9ba535
Author: Dana Jacobsen <dana at acm.org>
Date:   Tue May 28 09:23:26 2013 -0700

    Speed up primality proof tests on non-64-bit machines
---
 t/81-bignum.t | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/t/81-bignum.t b/t/81-bignum.t
index 1174d22..977d7f0 100644
--- a/t/81-bignum.t
+++ b/t/81-bignum.t
@@ -10,6 +10,7 @@ use warnings;
 # some small leaks in this test, which has nothing to do with the module.
 
 my $extra = defined $ENV{EXTENDED_TESTING} && $ENV{EXTENDED_TESTING};
+my $use64 = ~0 > 4294967295;
 my $broken64 = (18446744073709550592 == ~0);
 
 use Test::More;
@@ -141,7 +142,11 @@ foreach my $n (@composites) {
 }
 foreach my $n (@proveprimes) {
   ok( is_prime($n), "$n is prime" );
-  ok( is_provable_prime($n), "$n is provably prime" );
+  SKIP: {
+    skip "Large proof on 32-bit machine.", 1
+      if !$use64 && !$extra && $n > 2**66;
+    ok( is_provable_prime($n), "$n is provably prime" );
+  }
 }
 
 ###############################################################################

-- 
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