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

Comment (by rws):

 Replying to [comment:13 mstreng]:
 > So the correct answer to {{{binomial(Zmod(3)(1), 3)}}} is "any integer
 modulo 3". Just returning Zmod(3)(0) is wrong. It would be ok to raise an
 error, I'd say `ZeroDivisionError`
 Pari does this too.
 > There are of course some cases that we can still allow. Suppose the
 input is {{{binomial(Zmod(n)(x), y)}}}.
 Example with Pari:
 {{{
 ? binomial(Mod(7,11),3)
 %3 = Mod(2, 11)
 }}}

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