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

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

commit 62f61f8828703043a5d24c29cc652e3f28d3d0b2
Author: Dana Jacobsen <d...@acm.org>
Date:   Mon Nov 5 01:25:44 2012 -0800

    Add option to ensure all output has gone through primality proving
---
 bin/primes.pl | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/primes.pl b/bin/primes.pl
index a0c11c7..091a71a 100755
--- a/bin/primes.pl
+++ b/bin/primes.pl
@@ -3,8 +3,9 @@ use strict;
 use warnings;
 use Getopt::Long;
 use Math::BigInt try => 'GMP';
-use Math::Prime::Util qw/primes is_prime next_prime prev_prime
-                         prime_count primorial pn_primorial/;
+use Math::Prime::Util qw/primes  prime_count  next_prime  prev_prime
+                         is_prime  is_provable_prime
+                         prime_count  primorial  pn_primorial/;
 $| = 1;
 
 # For many more types, see:
@@ -90,6 +91,7 @@ GetOptions(\%opts,
            'pnp1|A005234',
            'pnm1|A006794',
            'euclid|A018239',
+           'provable',
            'nompugmp',   # turn off MPU::GMP for debugging
            'help',
           ) || die_usage();
@@ -470,6 +472,9 @@ sub gen_and_filter {
   if (exists $opts{'good'}) {
     @p = grep { is_good_prime($_); } @p;
   }
+  if (exists $opts{'provable'}) {
+    @p = grep { is_provable_prime($_) == 2; } @p;
+  }
   @p;
 }
 
@@ -538,6 +543,7 @@ to only those primes additionally meeting these conditions:
   --pnp1       Primorial+1      p#+1 is prime
   --pnm1       Primorial-1      p#-1 is prime
   --euclid     Euclid           pn#+1 is prime
+  --provable                    Ensure all primes are provably prime
 
 Note that options can be combined, e.g. display only safe twin primes.
 In all cases involving multiples (twin, triplet, etc.), the value returned

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to