[libmath-prime-util-perl] 167/181: Adjust PP testing to reflect some functions now being in XS
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:51:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.36
in repository libmath-prime-util-perl.
commit 5aaf9774cda1fa7f87026b4e1c3ff6c0455b4eb3
Author: Dana Jacobsen <dana at acm.org>
Date: Sun Jan 12 03:21:06 2014 -0800
Adjust PP testing to reflect some functions now being in XS
---
lib/Math/Prime/Util.pm | 2 +-
t/19-moebius.t | 6 +++++-
t/80-pp.t | 9 +++++++--
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index aaec9ce..d6ea417 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -3271,7 +3271,7 @@ also returns 0 for input 0, but returns C<euler_phi(-n)> for C<n E<lt> 0>.
If called with two arguments, they define a range C<low> to C<high>, and the
function returns an array with the totient of every n from low to high
-inclusive. Large values of high will result in a lot of memory use.
+inclusive.
=head2 jordan_totient
diff --git a/t/19-moebius.t b/t/19-moebius.t
index 9ee1c56..4995655 100644
--- a/t/19-moebius.t
+++ b/t/19-moebius.t
@@ -363,7 +363,7 @@ plan tests => 0 + 1
+ 3*scalar(keys %mertens)
+ 1*scalar(keys %big_mertens)
+ 2 # Small Phi
- + 7 + scalar(keys %totients)
+ + 8 + scalar(keys %totients)
+ 1 # Small Carmichael Lambda
+ scalar(@kroneckers)
+ scalar(@gcds)
@@ -422,6 +422,10 @@ is_deeply( [euler_phi(1,2)], [1,1], "euler_phi 1-2" );
is_deeply( [euler_phi(1,3)], [1,1,2], "euler_phi 1-3" );
is_deeply( [euler_phi(2,3)], [1,2], "euler_phi 2-3" );
is_deeply( [euler_phi(10,20)], [4,10,4,12,6,8,8,16,6,18,8], "euler_phi 10-20" );
+is_deeply( [euler_phi(1513,1537)],
+ [qw/1408 756 800 756 1440 440 1260 576 936 760 1522 504 1200 648
+ 1016 760 1380 384 1530 764 864 696 1224 512 1456/],
+ "euler_phi(1513,1537)" );
###### Jordan Totient
while (my($k, $tref) = each (%jordan_totients)) {
diff --git a/t/80-pp.t b/t/80-pp.t
index b744b5e..2240202 100644
--- a/t/80-pp.t
+++ b/t/80-pp.t
@@ -267,8 +267,8 @@ plan tests => 2 +
use Math::Prime::Util qw/primes prime_count_approx prime_count_lower
prime_get_config prime_set_config
- consecutive_integer_lcm moebius mertens euler_phi
- exp_mangoldt chebyshev_theta chebyshev_psi
+ consecutive_integer_lcm
+ chebyshev_theta chebyshev_psi
is_prob_prime
/;
use Math::BigInt;
@@ -298,6 +298,11 @@ require_ok 'Math::Prime::Util::PrimalityProving';
*factor = \&Math::Prime::Util::PP::factor;
+ *moebius = \&Math::Prime::Util::_generic_moebius;
+ *euler_phi = \&Math::Prime::Util::_generic_euler_phi;
+ *mertens = \&Math::Prime::Util::_generic_mertens;
+ *exp_mangoldt = \&Math::Prime::Util::_generic_exp_mangoldt;
+
*RiemannR = \&Math::Prime::Util::PP::RiemannR;
*RiemannZeta = \&Math::Prime::Util::PP::RiemannZeta;
*LogarithmicIntegral = \&Math::Prime::Util::PP::LogarithmicIntegral;
--
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