Question: Rewrite the Pseudocode for Horner's method in either C + + , Java, or Python. Test it by using the function used in the notes

Rewrite the Pseudocode for Horner's method in either C++, Java, or Python. Test it by using the function used in the notes when deriving what Horner's Method would look like, f(x)=-1+5x-3x2+3x3+2x4 by evaluating it at x=0.5 to get P(0.5)=1.25. Include your rewritten code in the HW you turn in.
For the polynomial P(x)=8-3x2+2x4+8x6-2x8+3x10,
(a) How many additions and multiplications would Horner's method use to evaluate P(0.1)?
(b) What function call would you write to use the Horner's method function you wrote in problem 5 in order to evaluate P(0.1)?
(c) How many times would using Horner's method directly here waste time adding 0?
For the polynomial P(x)=4x+5x3+7x5+9x7-x9+4x11,
(a) How many additions and multiplications would Horner's method use to evaluate P(0.1)?
(b) What function call would you write to use the Horner's method function you wrote in problem 5 in order to evaluate P(0.1)?
(c) How many times would using Horner's method directly here waste time adding 0?
Using the Horner's method function given in the notes, consider the following call to Horner's method. Horners ([2,4,-3,8,-5,6],0.2)
(a) What degree polynomial is being inputted into the function in array form?
(b) How many multiplications and additions will the Horner's method function do?
Using the Horner's method function given in the notes, consider the following call to Horner's method.
Horners ([1,-5,2,7,2,-8,9,-2],0.2)
(a) What degree polynomial is being inputted into the function in array form?
(b) How many multiplications and additions will the Horner's method function do?
 Rewrite the Pseudocode for Horner's method in either C++, Java, or

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!