#12179: Binomial of integer (mod n) returns integer
--------------------------------+-------------------------------------------
   Reporter:  scotts            |          Owner:  AlexGhitza                  
       Type:  defect            |         Status:  needs_work                  
   Priority:  major             |      Milestone:  sage-4.8                    
  Component:  basic arithmetic  |       Keywords:  binomial coefficiant, modulo
Work_issues:                    |       Upstream:  N/A                         
   Reviewer:                    |         Author:  Sam Scott                   
     Merged:                    |   Dependencies:                              
--------------------------------+-------------------------------------------
Changes (by johanbosman):

  * status:  positive_review => needs_work


Comment:

 The line
 {{{
  Test of integers modulo n:
 }}{
 should end in two colons (for docbuilding).  Furthermore,
 {{{
  return x.parent()(binomial(ZZ(x), m, **kwds))
 }}}
 is inefficient when computing modulo a small number n: the binomial
 coefficient over ZZ may be huge, whereas its reduction modulo n will be
 small.  It is therefore better to to the entire calculation modulo n.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12179#comment:5>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to