[libmath-prime-util-perl] 20/54: Merge with master
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:52:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.38
in repository libmath-prime-util-perl.
commit fee1203ec515a51117943ec242ba0cea2831e05e
Merge: d29c977 382d4e2
Author: Dana Jacobsen <dana at acm.org>
Date: Tue Feb 4 12:28:05 2014 -0800
Merge with master
lib/Math/Prime/Util/PP.pm | 3 +--
util.c | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --cc lib/Math/Prime/Util/PP.pm
index a6ec6f2,eb6fd5b..35ae158
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@@ -1429,13 -1429,8 +1429,12 @@@ sub _gcd_ui
sub is_power {
my ($n, $a) = @_;
- return 0 if $n <= 3 || $n != int($n);
+ return 0 if $n <= 3;
- return !(is_power($n) % $a) if defined $a && $a != 0;
+ if (defined $a && $a != 0) {
+ return _is_perfect_square($n) if $a == 2;
+ $n = Math::BigInt->new("$n") unless ref($n) eq 'Math::BigInt';
+ return $n->copy->broot($a)->bint->bpow($a) == $n;
+ }
- #return 2 if _is_perfect_square($n);
$n = Math::BigInt->new("$n") unless ref($n) eq 'Math::BigInt';
my $e = 2;
while (1) {
--
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