Previous Up Next

11.2.6  Choosing the GCD algorithm of two polynomials

The ezgcd, heugcd, modgcd and psrgcd commands compute the gcd (greatest common divisor) of two univariate or multivariate polynomials with coefficients in ℤ or ℤ[i] with different algorithms.

Examples

ezgcd(x^2-2*x*y+y^2-1,x-y)

or:

heugcd(x^2-2*x*y+y^2-1,x-y)

or:

modgcd(x^2-2*x*y+y^2-1,x-y)

or:

psrgcd(x^2-2*x*y+y^2-1,x-y)
     
1           
ezgcd((x+y-1)*(x+y+1),(x+y+1)^2)

or:

heugcd((x+y-1)*(x+y+1),(x+y+1)^2)

or:

modgcd((x+y-1)*(x+y+1),(x+y+1)^2)
     
x+y+1           
psrgcd((x+y-1)*(x+y+1),(x+y+1)^2)
     
xy−1           
ezgcd((x+1)^4-y^4,(x+1-y)^2)
     
GCD not successful Error: Bad Argument Value           

But:

heugcd((x+1)^4-y^4,(x+1-y)^2)

or:

modgcd((x+1)^4-y^4,(x+1-y)^2)

or:

psrgcd((x+1)^4-y^4,(x+1-y)^2)
     
xy+1           

Previous Up Next