[back] [prev] [next] [index] [root]

 


PolyXGcd

Returns the extended gcd of two polynomials.

Syntax:

l := PolyXGcd(f, h);

list of polynomials
  l  
polynomial
  f  
polynomial
  h  

See also:  PolyGcd

Description:

Given two polynomials f,h\in S[x] where S is a field the function returns the gcd g of f and h together with polynomials a b such that g = af + bh.


Example:


kash> Qx := PolyAlg(Q);
Univariate Polynomial Ring in x over Rational Field

kash> f := Poly(Qx, [1, 2, 3, 4, 5, 6]);
x^5 + 2*x^4 + 3*x^3 + 4*x^2 + 5*x + 6
kash> h := Poly(Qx, [1, 4, 10, 16, 22, 28, 27, 18]);
x^7 + 4*x^6 + 10*x^5 + 16*x^4 + 22*x^3 + 28*x^2 + 27*x + 18
kash> PolyXGcd(f, h);
> [ x^5 + 2*x^4 + 3*x^3 + 4*x^2 + 5*x + 6, 1, 0 ]


<- back[back] [prev] [next] [index] [root]