Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gcd

GCD and LCM for Polynomials


Description

Compute the greatest common divisor (GCD) and least common multiple (LCM) of a collection of polynomials and polylists.

Usage

## S3 method for class 'polylist'
GCD(...)
## S3 method for class 'polynomial'
GCD(...)
## S3 method for class 'polylist'
LCM(...)
## S3 method for class 'polynomial'
LCM(...)

Arguments

...

a list of objects of class polynomial or polylist.

Examples

pl <- polylist(poly.from.roots(-1),
               poly.from.roots(c(-1, -1)),
               poly.from.roots(1))
GCD(pl)
GCD(pl[-3])
LCM(pl)
LCM(pl, pl, pl[[2]])

polynom

A Collection of Functions to Implement a Class for Univariate Polynomial Manipulations

v1.4-0
GPL-2
Authors
Bill Venables [aut, cre] (S original), Kurt Hornik [aut] (R port), Martin Maechler [aut] (R port)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.