One difficulty with implementing this is that there are lots of
different polynomial classes, and also lots of different __pow__
methods.  In each case one could perhaps test to see of the
characteristic was p>0 and the exponent a power of p, and call special
code.  (I think this was done a while ago for powering elements of
finite fields.)

In the case of univariate polynomials over GF(p) the type of the
polynomial is
'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint'
which suggests to me that the powering is done within the Flint
library.  In which case that is where improvements should be made (in
this case).

John Cremona

On Nov 20, 9:00 pm, finotti <[email protected]> wrote:
> Dear Simon,
>
> On Nov 20, 2:19 pm, Simon King <[email protected]> wrote:
>
> > Hi Luis!
>
> > First, I would produce a clone of Sage, in order to not  destroy your
> > installation by mistake. So, in the shell, do
> >   sage -clone work
> > where you can replace "work" by another word that you like (except
> > "main").
>
> > (...)
>
> Thanks for the info.  I will give it a try.  I thought I could just
> add a blob (which maybe could be loaded at start up)
> redefining .__pow.__, but that I will try your suggestion.
>
> Thanks for the quick and helpful reply.
>
> Best,
>
> Luis

-- 
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-support
URL: http://www.sagemath.org

Reply via email to