[libmath-prime-util-perl] 04/05: PP jordan totient, be more aggressive about BigInt args. ActiveState weirdness?
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:52:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.39
in repository libmath-prime-util-perl.
commit edf7c2b0c488f45867bc7538e62d65d748e588e9
Author: Dana Jacobsen <dana at acm.org>
Date: Sat Mar 1 19:44:26 2014 -0800
PP jordan totient, be more aggressive about BigInt args. ActiveState weirdness?
---
lib/Math/Prime/Util/PP.pm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/Math/Prime/Util/PP.pm b/lib/Math/Prime/Util/PP.pm
index fb11d1d..14686a8 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -602,8 +602,7 @@ sub jordan_totient {
my $totient = BONE->copy;
foreach my $f (@pe) {
my ($p, $e) = @$f;
- $p = Math::BigInt->new("$p") unless ref($p) eq 'Math::BigInt';
- $p->bpow($k);
+ $p = Math::BigInt->new("$p")->bpow($k);
$totient->bmul($p->copy->bdec());
$totient->bmul($p) for 2 .. $e;
}
--
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