GCD {PolynomF}R Documentation

GCD and LCM or two or more polynomials

Description

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.

Usage

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

Arguments

... Either individual polynom arguments or a single polylist object with all polynomials.

Details

Uses the classical GCD and LCM algorithms with polynomial arithmetic.

Value

A single polynomial object giving the GCD or LCM respectively, normalised to have the leading coefficient unity (i.e. a monic polynomial).

Author(s)

Kurt Hornik, slightly modified by Bill Venables.

References

None.

Examples

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)


[Package PolynomF version 0.93 Index]