5. Evaluate 5?2 + 2x + 3 at x = 2 by working through each step of the algorithm showing the values assigned at each assignment step.
y: = ?n
for i: = 1 to n
y: = y * c + ??−?
Note that the general form of the quadratic assumed above is {y = ?? ??+ ??−? ??−?+ ... + ??c + ??}
b) Exactly how many multiplications and additions are used by this algorithm to evaluate a polynomial of degree n at x = c? (Do not count additions used to increment the loop variable.)
Get Answers For Free
Most questions answered within 1 hours.