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 d4e28478cad10ffa09f9a309546d330a94c4211c
Author: Dana Jacobsen <d...@acm.org>
Date:   Wed May 14 11:19:56 2014 -0700

    binomial documentation update
---
 lib/Math/Prime/Util.pm | 9 +++++----
 t/19-moebius.t         | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index 660b81c..9060bee 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -2207,10 +2207,11 @@ arguments use the L<Kronenburg 
extensions|http://arxiv.org/abs/1105.3689/>.
 This corresponds to Pari's C<binomial(n,k)> function, Mathematica's
 C<Binomial[n,k]> function, and GMP's C<mpz_bin_ui> function.
 
-The rules for negative C<n> follow the same rules as the functions mentioned,
-which does not match Math::BigInt.  Additionally, Pari does not use the
-extension for C<n E<lt>0 ; k E<lt>= n>, while GMP's API doesn't allow this
-case at all.
+For negative arguments, this matches Mathematica.  Pari does not implement
+the C<n E<lt> 0, k E<lt>= n> extension and instead returns C<0> for this
+case.  GMP's API does not allow negative C<k> but otherwise matches.
+L<Math::BigInt> does not implement any extensions and the results for
+C<n E<lt> 0, k > 0> are undefined.
 
 
 =head2 znorder
diff --git a/t/19-moebius.t b/t/19-moebius.t
index f1c0ad7..720f954 100644
--- a/t/19-moebius.t
+++ b/t/19-moebius.t
@@ -691,7 +691,7 @@ is_deeply( [map { binomial(10, $_) } -15 .. 15],
            "binomial(10,n) for n in -15 .. 15" );
 is_deeply( [map { binomial(-10, $_) } -15 .. 15],
            [qw/-2002 715 -220 55 -10 1 0 0 0 0 0 0 0 0 0 1 -10 55 -220 715 
-2002 5005 -11440 24310 -48620 92378 -167960 293930 -497420 817190 -1307504/],
-           "binomial(10,n) for n in -15 .. 15" );
+           "binomial(-10,n) for n in -15 .. 15" );
 
 sub cmp_closeto {
   my $got = shift;

-- 
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