#9634: binomial does not accept variable when only in the lower argument
------------------------------------+---------------------------------------
       Reporter:  Henryk.Trappmann  |         Owner:  burcin      
           Type:  defect            |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.11   
      Component:  symbolics         |    Resolution:              
       Keywords:                    |   Work issues:              
Report Upstream:  N/A               |     Reviewers:              
        Authors:  Burcin Erocal     |     Merged in:              
   Dependencies:                    |      Stopgaps:              
------------------------------------+---------------------------------------
Changes (by burcin):

  * status:  needs_work => needs_review


Old description:

> {{{
> sage: var('k')
> k
> sage: binomial(x,3)
> 1/6*(x - 2)*(x - 1)*x
> sage: binomial(3,k)
> ---------------------------------------------------------------------------
> TypeError: Either m or x-m must be an integer
> }}}
>
> From kcrisman:
> Is this a bug?  I would say yes, because
> {{{
> sage: binomial(x,k)
> binomial(x, k)
> }}}
> works, but maybe we want to have it be a specific integer if the top
> number is given?  Any input?

New description:

 {{{
 sage: var('k')
 k
 sage: binomial(x,3)
 1/6*(x - 2)*(x - 1)*x
 sage: binomial(3,k)
 ---------------------------------------------------------------------------
 TypeError: Either m or x-m must be an integer
 }}}

 From kcrisman:
 Is this a bug?  I would say yes, because
 {{{
 sage: binomial(x,k)
 binomial(x, k)
 }}}
 works, but maybe we want to have it be a specific integer if the top
 number is given?  Any input?

 Apply [attachment:trac_9634-symbolic_binomial.take2.patch]

--

Comment:

 I uploaded a new patch that fixes doctests as well. This meant
 reimplementing the `_eval_()` and `_evalf_()` methods to override those
 defined in pynac.

 Patchbot, apply only trac_9634-symbolic_binomial.take2.patch.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9634#comment:6>
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/groups/opt_out.


Reply via email to