Question: please use C program gcc and be sure about your answer. Problem 2 (4 points) iteration The square root of a number a > 0

 please use C program gcc and be sure about your answer.

please use C program gcc and be sure about your answer.

Problem 2 (4 points) iteration The square root of a number a > 0 can be computed using Newton's Zn+1 = 0.5(Zn + a/Zn), where zo is an initial guess Write a C program that takes as input an initial guess ro, o tolerance tol, and number of iterations, n max and iterates the above scheme until convergence or nmax is reached. The iterations converge when n+1-l tol, your program should also output a message with the value of +nl, e.g Enter positive number, initial guess, tolerance, max number of iterations: 100 1 1e-14 5 Max iterations 5 reached, lx-{n+1) -x_al = 3.3e-02 sqrt (100) 1.0000052895643e+01, number of iterations 5 Note: I may have the number of iterations above off by one Here use "Max iterations %d reached, lx-{n+1) -x-nl %.1e " . = . Store your program in file al_newton.c

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!