Math.polynom {PolynomF} | R Documentation |
The function Ops.polynom
allows arithmetic operations on
polynom
objects: addition, subtraction, multiplication, division
(with remainder), remainder, raising to a non-negaive integer power. It
also allows exact equality and exact inequality tests.
Math.polynom
allows round
, signif
, floor
,
ceiling
and trunc
operations on a polynom
coefficient vector, returning a polynom
result.
Summary.polynom
and Summary.polylist
allow sum
and
prod
operations on polynom
arguments, specified either as
individual polynom
objects or in a single polylist
object.
## S3 method for class 'polynom': Math(x, ...) ## S3 method for class 'polylist': Math(x, ...) ## S3 method for class 'polynom': Ops(e1, e2) ## S3 method for class 'polynom': Summary(..., na.rm = FALSE) ## S3 method for class 'polylist': Summary(..., na.rm = FALSE)
e1, e2 |
Objects of class polynom or numeric arguments
which may be coerced to class polynom . At least one must be
a polynom object. |
x |
An object of class polymon or polylist . |
... |
polynom objects or scalar numeric, as appropriate.
In the case of Summary.polylist , may be a single
polylist object. |
na.rm |
logical: should missing values be removed first? |
None of these functions is called directly. Ops.polynom
is the
workhorse of the entire package. Ops.polylist
allows
vectorised arithmetic computations on polylist
s.
A polynom
(or polylist
) object giving the result of the operation.
Bill Venables, with some code provided by Kurt Hornik
None
x <- polynom(0:1) p <- (x + 1)^2 - 3 round(p/3) sum(p, p^2, p^3, p^4)