Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

NW-Horner.n In[i]s NewtonHorner [x0 , zmax ] : Module {j = 0, k, n= Length [a]-1

ID: 3733020 • Letter: N

Question

NW-Horner.n In[i]s NewtonHorner [x0 , zmax ] : Module {j = 0, k, n= Length [a]-1, r0 = N(x0]), c=b=Table [ 0, {i,n+1)); Print( "ro ", PaddedForm[r0, {16, 16)], ", P[Ko] NumberForm[P[r0], 16] 1: Printl" r",,"PaddedForm[rl, t16, 163],",PI,"3 "] = ", NumberForn [P[r1] , 16] ]; Print[",NumberFormr1, 161 Print [ " P [r] ", NurnberForrn [ P [r1], 16] ]; 100%

Explanation / Answer

#include #include using namespace std; float horner(float A[],int d ,float x) { double r; int i; r=A[d]; i=d-1; while (i>=0) r = A[i--] + r * x; return r; } int main() { float *coefficients,*A0,*A1,A0X,A1X, f_xo1,f_xo2;; //Pointer to an array of real numbers int degree, i,k, n,x0,z; // degree of polynomial cout > degree; //Dynamically allocate memory large enough to hold array of coefficients of polynomial coefficients = new float[degree+1]; cout -1; i--) { cin >> coefficients[i]; } //prints the polynomial cout