Evaluate Polynomial and Rational Functions using Horner's method
Calculate
horner.poly(x, P) horner.rational(x, P, Q)
x |
a vector |
P |
the coefficients of the polynomial in the numerator, in increasing order |
Q |
the coefficients of the polynomial in the denominator |
y = (P_1 + P_2*x + P_3*x^2 + ... ) / ( Q_1 + Q_2*x + Q_3*x^2 + ...)
If the coefficients have zeros as highest powers, those are ignored.
a vector
P <- c(1,-2,1) horner.poly(polyroot(P), P)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.