Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 8 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
View
1  .gitignore
@@ -4,6 +4,7 @@ Makefile.old
Makefile.PL
Build
_build*
+\.build*
pm_to_blib*
*.tar.gz
.lwpcookies
View
4 Build.PL
@@ -2,6 +2,9 @@ use strict;
use warnings;
use Module::Build;
+# NOTE: This Build.PL is to make it easier for people without dzil
+# to install dependencies/etc. It may be out of sync with dist.ini
+
my $builder = Module::Build->new(
module_name => 'Math::Primality',
license => 'perl',
@@ -18,7 +21,6 @@ my $builder = Module::Build->new(
'Math::GMPz' => 0.26,
},
add_to_cleanup => [ 'Math-Primality-*' ],
- create_makefile_pl => 'traditional',
meta_merge => {
resources => {
repository => 'http://github.com/leto/math--primality/tree/master'
View
38 MANIFEST
@@ -1,38 +0,0 @@
-bench/small_primes
-bench/test_large_primes
-bin/primes.pl
-bin/strong_psuedoprimes.pl
-Build.PL
-Changes
-CREDITS
-examples/is_strong
-examples/project_euler/10/project_euler_10.pl
-lib/Math/Primality.pm
-lib/Math/Primality/AKS.pm
-lib/Math/Primality/BigPolynomial.pm
-MANIFEST This list of files
-MANIFEST.SKIP
-META.yml
-README.md
-ROADMAP
-spec/bpsw/bpsw1.c
-spec/bpsw/trn.c
-spec/bpsw/trn.h
-t/00-load.t
-t/boilerplate.t
-t/is_aks_prime.t
-t/is_prime.t
-t/is_pseudoprime.t
-t/is_strong_lucas_pseudoprime.t
-t/is_strong_pseudoprime.t
-t/next_prime.t
-t/pod.t
-t/prev_prime.t
-t/prime_count.t
-xt/verify_is_prime.t
-xt/verify_is_prime_long.t
-xt/verify_next_prime_long.t
-xt/verify_prime_count.t
-xt/verify_strong.t
-Makefile.PL
-META.json
View
3  bin/primes.pl
@@ -5,6 +5,9 @@
use Math::Primality qw/is_prime/;
$|++;
+# PODNAME: primes.pl
+# ABSTRACT: Print all primes between the two integers
+
my ($start, $end) = @ARGV;
die "USAGE:$0 start end\n" unless ($start >= 0 && $end > $start);
View
3  bin/strong_psuedoprimes.pl
@@ -5,6 +5,9 @@
use Math::Primality qw/is_strong_pseudoprime is_prime/;
$|++;
+# PODNAME: strong_pseudoprimes.pl
+# ABSTRACT: Print all strong pseudoprimes between two integers
+
my ($base, $start, $end) = @ARGV;
die "USAGE:$0 base start end\n" unless ($base && $start >= 0 && $end > $start);
View
39 dist.ini
@@ -0,0 +1,39 @@
+name = Math-Primality
+author = Jonathan "Duke" Leto <jonathan@leto.net>
+license = Perl_5
+copyright_holder = Leto Labs LLC
+copyright_year = 2012
+
+[PkgVersion]
+
+[MetaResources]
+homepage = http://github.com/leto/math--primality
+repository.web = http://github.com/leto/math--primality
+repository.url = http://github.com/leto/math--primality.git
+repository.type = git
+;x_mailing_list =
+
+[PruneCruft]
+; we maintain a Build.PL in the repository to be able to work without dzil,
+; but for the distribution we let dzil generate a Build.PL with the proper
+; dependencies and such
+[PruneFiles]
+filenames = Build.PL
+
+[@Git]
+
+[Git::NextVersion]
+first_version = 0.05
+
+[@Basic]
+
+[AutoPrereqs]
+
+[PodWeaver]
+
+[Prereqs / BuildRequires]
+Test::More = 0
+Test::Exception = 0
+
+[Prereqs / ConfigureRequires]
+Module::Build = 0.38
View
8 lib/Math/Primality.pm
@@ -69,19 +69,15 @@ use constant
use constant GMP => 'Math::GMPz';
+# ABSTRACT: Check for primes with Perl
+
=head1 NAME
Math::Primality - Advanced Primality Algorithms using GMP
-=head1 VERSION
-
-Version 0.04
=cut
-our $VERSION = '0.04_01';
-$VERSION = eval $VERSION;
-
our @EXPORT_OK = qw/is_pseudoprime is_strong_pseudoprime is_strong_lucas_pseudoprime is_prime next_prime prev_prime prime_count/;
View
11 lib/Math/Primality/AKS.pm
@@ -10,19 +10,14 @@ use constant DEBUG => 0;
use constant GMP => 'Math::GMPz';
-=head1 NAME
-
-Math::Primality::AKS - The Agrawal-Kayal-Saxena primality testing algorithm
+# ABSTRACT: Check for primality using the AKS (Agrawal-Kayal-Saxena) algorithm
-=head1 VERSION
+=head1 NAME
-Version 0.01
+Math::Primality::AKS - Check for primes with AKS
=cut
-our $VERSION = '0.01';
-$VERSION = eval $VERSION;
-
our @EXPORT_OK = qw/is_aks_prime/;
our %EXPORT_TAGS = ( all => \@EXPORT_OK );
View
9 lib/Math/Primality/BigPolynomial.pm
@@ -4,6 +4,15 @@ use strict;
use warnings;
use Math::GMPz;
+# ABSTRACT: Big Polynomials
+
+=head1 NAME
+
+Math::Primality::BigPolynomials - Polynomials with BigInts
+
+=cut
+
+
sub new {
my $self = {};
my $class = shift;

No commit comments for this range

Something went wrong with that request. Please try again.