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

 


PolyGcd

Returns the gcd of two polynomials.

Syntax:

g := PolyGcd(f, h);

polynomial
  g  
polynomial
  f  
polynomial
  h  

See also:  PolyXGcd

Description:

Given two polynomials f,h\in S[x] where S is a field or Z the function returns the gcd g of f and h.


Example:


kash> f := Poly(Zx, [1, 2, 3, 4, 5, 6]);
x^5 + 2*x^4 + 3*x^3 + 4*x^2 + 5*x + 6
kash> h := Poly(Zx, [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> PolyGcd(f, h);
> x^5 + 2*x^4 + 3*x^3 + 4*x^2 + 5*x + 6


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