Question: Exercise 5 . While studying hash tables, we implemented a version of Horner's rule for evaluating a polynomial in our lecture notes. Essentially, we have
Exercise While studying hash tables, we implemented a version of Horner's rule for evaluating a polynomial in our lecture notes. Essentially, we have a polynomial of the form
dots
and we want to compute its value for a given Implement a recursive version of the Horner's rule in C You need to implement:
A function horner that
takes a vector where the coefficients dots, are stored, an int variable for the degree of the polynomial, and a double variable
computes the polynomial above for the given value of and returns it
A main function that reads the parameters and the coefficients, makes a call to horner, and prints the output of evaluation.
Note: Full mark is only given to working codes.
points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
