#13642: Modular exponentiation of polynomials
-------------------------------------------------------+--------------------
       Reporter:  caruso                               |         Owner:  
AlexGhitza   
           Type:  defect                               |        Status:  
needs_review 
       Priority:  major                                |     Milestone:  
sage-5.11    
      Component:  algebra                              |    Resolution:         
      
       Keywords:  modular exponentiation, polynomials  |   Work issues:         
      
Report Upstream:  N/A                                  |     Reviewers:  Burcin 
Erocal
        Authors:  caruso                               |     Merged in:         
      
   Dependencies:                                       |      Stopgaps:         
      
-------------------------------------------------------+--------------------

Comment (by caruso):

 I declared right to be an Integer but not modulus to be a Polynomial
 because I guess that it could be also an Integer (or even something else).

 Here are timings you are asking for:

 {{{
 sage: k = GF(5)
 sage: l = k.extension(x^2 + 2)
 sage: R.<x> = l[]
 sage: f = R.random_element(5)
 sage: h = R.random_element(5)

 # Without the patch
 sage: timeit("g=pow(f,50,h)")
 5 loops, best of 3: 2.43 s per loop

 # With the patch
 sage: timeit("g=pow(f,50,h)")
 5 loops, best of 3: 68.8 ms per loop
 sage: timeit("g=pow(f,10000000,h)")
 5 loops, best of 3: 276 ms per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13642#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 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