This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.41
in repository libmath-prime-util-perl.

commit 30fe98f2d89da68f3499309d36ba5d378344df3b
Author: Dana Jacobsen <d...@acm.org>
Date:   Tue May 13 22:02:13 2014 -0700

    Work around old Math::BigInt bug
---
 lib/Math/Prime/Util/PP.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Math/Prime/Util/PP.pm b/lib/Math/Prime/Util/PP.pm
index 86c0596..9e3e1a6 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -1789,6 +1789,8 @@ sub binomial {
   my($n, $k) = @_;
   return 0 if $n >= 0 && ($k < 0 || $k > $n);
   return 0 if $n < 0  && $k < 0 && $k > $n;
+  return 1 if $k == 0;        # Work around bug in old
+  return $n if $k == $n-1;    # Math::BigInt (fixed in 1.90)
   my $r;
   if ($n >= 0) {
     $r = Math::BigInt->new("$n")->bnok("$k");

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to