Is there equivalent of PowerMod
for polynomials in Mathematica?
We have Mod[a^e,m]==PowerMod[a,e,m]
, $a$, $e$ and $m$ all integers.
PowerMod
is much more efficient for large $e$.
We have also PolynomialMod[p1^e,p2]
, $p1$ polynomial, $e$ integer, $p2$ integer or polynomial.
For large $e$ it is inefficient.
Something like PolynomialPowerMod
would be useful. Is there something like it? Or I have to write my own procedure?