![]()
where
and
is the leading coefficient of the polynomial
, i.e., the coefficient of the
-th power of
, so that the pseudo-quotient
and the pseudo-remainder
are also from
![]()
gcd := GCDPRS(a(x), b(x)) :=
[suppose that degree of polynomial a is greater or equal to the
degree of polynomial b, i.e., deg(a) >= deg(b)
algorithms used:
prem(a, b) - pseudo-remainder of polynomial a with polynomial b
pp(a) - primitive part of the polynomial a
gcdi(j, k) - gcd of two integers j, k]
1. A := pp(a)
B := pp(b)
2. while B != 0 do
r := prem(A, B)
A := B
B := r
od
3. return gcdi(cont(a), cont(b)) pp(a)