#17123: Extending binomial(n,k) to negative integers n, k.
---------------------------------+------------------------
       Reporter:  pluschny       |        Owner:
           Type:  enhancement    |       Status:  new
       Priority:  minor          |    Milestone:  sage-6.4
      Component:  combinatorics  |   Resolution:
       Keywords:  binomial       |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+------------------------

Comment (by nbruin):

 Maxima's documentation on the matter is silent, so I'd be hesitant to take
 it as authoritative on the matter, but your proposed code is at odds with
 maxima's for (n,n) with n negative (maxima gives zero in that case).
 Deviating from maxima requires careful planning because expressions can
 quite easily end up in maxima.
 {{{
 sage: [ (n,k) for n in [-10..10] for k in [-10..10] if BINOMIAL(n,k)
 !=maxima_calculus.binomial(n,k)]
 [(-10, -10),
  (-9, -9),
  (-8, -8),
  (-7, -7),
  (-6, -6),
  (-5, -5),
  (-4, -4),
  (-3, -3),
  (-2, -2),
  (-1, -1)]
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17123#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to