Skip to main content

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 pp and qq, returns a vector with three elements: the first one is the greatest common divisor of pp and qq, the second and the third ones are rr and ss, with the notation used above.

polynomials.extended_gcd.calc.png