[libmath-prime-util-perl] 15/54: Fix 5.6.2 issue with is_power

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:52:07 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 ee46293c1140b37041985407e00069deea5d1008
Author: Dana Jacobsen <dana at acm.org>
Date:   Sun Feb 2 11:13:11 2014 -0800

    Fix 5.6.2 issue with is_power
---
 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 89be15f..eb6fd5b 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -1429,9 +1429,8 @@ 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;
-  #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