powmod
power function with remainder
Calling Sequence
Parameters
Description
Examples
powmod(a, n, b, x)
a
-
polynomial in x
n
integer
b
x
name
The powmod function computes anmodb where a and b are polynomials in x and n is an integer, possibly negative. The case of n positive could also be computed as rem⁡an,b,x but powmod is more efficient and uses the method of binary powering with remainder.
powmod⁡x+1,16,x2+1,x
256
powmod⁡x+1,−2,x2−2,x
−2⁢x+3
See Also
gcdex
Powmod
rem
Download Help Document