convert(x^2 - x - 6, horner, x)
\[
-6 + (-1 + x)*x
\]
An example from https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/05Interpolation/horner/
xpts := [3.5, 4.7, 5.1, 6.9, 8.3];
coefflist := [5.3, 3.2, 2.1, -1.8, 1.7];
s := xpts[-1];
x := 5.5235423;
for i from -2 to -nops( xpts ) by -1 do
s := s*(x - xpts[i]) + coefflist[i];
end do:
xpts := [3.5, 4.7, 5.1, 6.9, 8.3]
coefflist := [5.3, 3.2, 2.1, -1.8, 1.7]
s := 8.3
x := 5.5235423
s := -13.22459891
s := -3.501177039
s := 0.316632609
s := 5.940719478
- Bradie, B.A., Friendly Introduction to Numerical Analysis, Pearson Education,2007
- Burden, R.L. and Faires, J.D., Numerical Analysis, Cengage Learning, 10 edition, 2015.
- Chapra, S.C. and Canale, R.P., Numerical Methods for Engineers, 6th edition, McGraw Hill,2009.
- Gerald C.F. and Wheatley, P.O., Applied Numerical Analysis, Pearson Education, 7th edition, 2003.
- Hauser, John R., Numerical Methods for Nonlinear Engineering Models, ISBN 978-1-4020-9920-5, 2009, Springer Netherlands, doi: 10.1007/978-1-4020-9920-5
- Numerical Analysis for Engineering
- Ostrowski, A.M., Solutions of Equations and Systems of Equations, Academic Press, New York, 1960.
- Petković, M.S., Neta, B., Petković, L.D., Džunić, J., Multipoint Methods for Solving Nonlinear Equations, Elsevier, Amsterdam, 2013.
- Traub, J.F., Iterative Methods for Solution of Equations, Prentice-Hall, Englewood Cliffs, NJ, 1964.
- Wu, X., Wu, H.W., On a class of quadratic convergence iteration formulae without derivatives, Applied Mathematics & Computations, 2000, Vol. 10, Issue 7, pp. 381--389.