#4296: univariate polynomial power ignores 2nd argument
------------------------------+---------------------------------------------
 Reporter:  zimmerma          |        Owner:  somebody
     Type:  defect            |       Status:  new     
 Priority:  critical          |    Milestone:  sage-3.2
Component:  basic arithmetic  |   Resolution:          
 Keywords:                    |  
------------------------------+---------------------------------------------
Old description:

> {{{
> sage: R = PolynomialRing(GF(2), x)
> sage: f = R(x^9 + x^7 + x^6 + x^5 + x^4 + x^2 + x)
> sage: h = R(x^10 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + 1)
> sage: (f^2) % h
> x^9 + x^8 + x^7 + x^5 + x^3
> sage: pow(f, 2, h)
> x^18 + x^14 + x^12 + x^10 + x^8 + x^4 + x^2
> }}}
> We should expect both results to be equal to f^2 mod h.

New description:

 {{{
 sage: R = PolynomialRing(GF(2), x)
 sage: f = R(x^9 + x^7 + x^6 + x^5 + x^4 + x^2 + x)
 sage: h = R(x^10 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + 1)
 sage: (f^2) % h
 x^9 + x^8 + x^7 + x^5 + x^3
 sage: pow(f, 2, h)
 x^18 + x^14 + x^12 + x^10 + x^8 + x^4 + x^2
 }}}
 We should expect both results to be equal to f^2^ mod h.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4296#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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