Description Usage Arguments Details Author(s) Examples

Horner's method for multivariate polynomials

1 | ```
horner(P,v)
``` |

`P` |
Free algebra polynomial |

`v` |
Numeric vector of coefficients |

This function is (almost) the same as `mvp::horner()`

.

Given a polynomial

\mjdeqnp(x) = a_0 +a_1+a_2x^2+\cdots + a_nx^nomitted; see latex

it is possible to express *p(x)* in the algebraically equivalent
form

p(x) = a_0 + x\left(a_1+x\left(a_2+\cdots + x\left(a_n-1 +xa_n \right)\cdots\right)\right)omitted; see PDF

which is much more efficient for evaluation, as it requires only *n*
multiplications and *n* additions, and this is optimal. Function
`horner()`

will take a `freealg`

object for its first
argument.

Robin K. S. Hankin

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.