Evaluating a polynomial with nested multiplication
Question
What is an efficient method for evaluating at a given ?
Short answer
Horner's scheme: multiplications and additions. Rewrite and evaluate from the inside out, starting with and repeating . Computing each power separately costs multiplications; Horner is and also numerically well behaved.
Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 7.1 Algorithms, 'Horner's algorithm', p.172; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solution