### 11.1.13 Polynomial evaluation with Horner algorithm

The horner command uses Horner’s method to evaluate polynomials.

- horner takes two arguments:
  - P, a polynomial given by its symbolic expression or by the list of its coefficients.
  - a, a number.
- horner(P,a) returns the value P(a), computed using Horner’s method.

#### Example

horner(x^2-2*x+1,2)

or:

horner([1,-2,1],2)

1 |  |  |  |  |  |  |  |  |  |