CSE 326, Spring 1998: Homework 1

Due 4/3/98

  1. (10 points) The classic way to evaluate a polynomial is Horner's Rule. Horner's rule can be stated recursively as follows:

    Let p(x) = a0 + a1*x + a2*x^2 + ... + ak*x^k be a polynomial. Note that * means "times"and ^ means "to the power". To evaluate the polynomial p(x) at c, first let r be the result of evaluating the polynomial a1 + a2*x + a3*x^2 + ... + ak*x^(k-1) at c, then evaluate the final result as a0 + c*r.