Extended gcd

Returns the final results of the extended Euclidean algorithm: an extension to the Euclidean algorithm which computes, besides the greatest common divisor of polynomials p and q, the coefficients of Bézout's identity, which are polynomials r and s such that p*r+q*s=gcd(p,q)

Syntax

extended_gcd(Polynomials, Polynomials)

Description

Given two polynomials pLaTeXp and qLaTeXq, returns a vector with three elements: the first one is the greatest common divisor of pLaTeXp and qLaTeXq, the second and the third ones are rLaTeXr and sLaTeXs, with the notation used above.

polynomials.extended_gcd.calc.png