Exercises 40—43 refer to another algorithm, known as Horner’s rule, for finding the value of a polynomial.
Algorithm 11.3.4 Homer’s Rule
[This algorithn computes the value of a polynomial
At each stage, starting with
Output: polyval [a real number]
40. Trace Algorithm 11.3.4 for the input
To find:
The trace table of the given algorithm for the given information.
Given information:
Following data is given.
The considered algorithm for Horner’s Rule is as follows.
Input:
for
next
[at this point
Output:
Calculation:
The algorithm starts with