Polynomial Evaluation: One Way
P(x) = c0xn + c1xn-1 + . . . + cn-1 x + cn
A slow method: first compute xn and multiply it by c0 Next compute x n-1 and multiply it by c1, etc.
This requires more than (n - 1) (n - 2) / 2 multiplications.
A more direct Method: Compute x, x2, x3, etc. saving them. Then multiply each by its corresponding coefficient and add the products.
This requires n memory locations to store the powers, and it requires 2n - 1 multiplications.