#12179: Binomial of integer (mod n) returns integer
-------------------------------------+-------------------------------------
       Reporter:  scotts             |        Owner:  AlexGhitza
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-
      Component:  basic arithmetic   |  duplicate/invalid/wontfix
       Keywords:  binomial           |   Resolution:
  coefficient modulo sd35            |    Merged in:
        Authors:  Sam Scott, Marco   |    Reviewers:  Colton Pauderis,
  Streng                             |  Johan Bosman, Marco Streng
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_work => needs_review
 * milestone:  sage-6.4 => sage-duplicate/invalid/wontfix


Comment:

 Hello,

 I just discover this ticket. During a cleanup in `sage.rings.arith`
 (#17852) I took care of this case. I propose to close this one as
 duplicate. With the branch applied we got
 {{{
 sage: from sage.rings.arith import binomial
 sage: R = Integers(6)
 sage: binomial(R(5), R(2))
 Traceback (most recent call last):
 ...
 ZeroDivisionError: Inverse does not exist.
 sage: R = Integers(21)
 sage: binomial(R(5), R(2))
 10
 sage: binomial(R(5), R(2)).parent()
 Ring of integers modulo 21
 }}}

 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/12179#comment:23>
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