gcd: Greatest common divisor of two polynomials

View source: R/gcd.R

gcdR Documentation

Greatest common divisor of two polynomials

Description

Greatest common divisor of two polynomials with rational coefficients.

Usage

gcd(qspray1, qspray2, utcf = FALSE)

Arguments

qspray1, qspray2

two qspray polynomials with at more nine variables

utcf

Boolean, whether to get the greatest common divisor up to a constant factor (this can be faster)

Value

A qspray polynomial.

Examples

library(resultant)
x <- qlone(1)
y <- qlone(2)
g <- x^2 + 2*x*y + 1
p <- g * (y^2 + x^2)
q <- g * (y + x^3 + 2)
gcd(p, q)

resultant documentation built on Sept. 11, 2024, 8:01 p.m.