GCD {PolynomF} | R Documentation |
Functions to find the Greatest Common Divisor (GCD) or Least Common
Multipe (LCM) of two or more polynomials, specified either as individual
arguments or as a polylist
object.
## S3 method for class 'polynom': GCD(...) ## S3 method for class 'polylist': GCD(...) ## S3 method for class 'polynom': LCM(...) ## S3 method for class 'polylist': LCM(...)
... |
Either individual polynom arguments or a single
polylist object with all polynomials. |
Uses the classical GCD and LCM algorithms with polynomial arithmetic.
A single polynomial object giving the GCD or LCM respectively, normalised to have the leading coefficient unity (i.e. a monic polynomial).
Kurt Hornik, slightly modified by Bill Venables.
None.
p1 <- poly.from.zeros(-3:2) p2 <- poly.from.zeros(0:4) pgcd <- GCD(p1, p2) pl <- polylist(p1, p2) plcm <- LCM(pl) polylist(pgcd, plcm)