Question: programming question 14. Write a program that finds the square root of an input floating-point number, a, using Newton's formula: (xn + a a/xn) Xn+1

programming question
14. Write a program that finds the square root of an input floating-point number, a, using Newton's formula: (xn + a a/xn) Xn+1 2 The program begins by using a/2 as an initial value for xo, and then iterates until the maximum precision is obtained. This means that you continue until the magnitude of the difference between two successive x; is minimal. (Remember, the spacing at a floating-point number, x, is approximated by ex.) Print out your answer and what the sart function in your library gives you for comparison, with as many digits as you can. 14. Write a program that finds the square root of an input floating-point number, a, using Newton's formula: (xn + a a/xn) Xn+1 2 The program begins by using a/2 as an initial value for xo, and then iterates until the maximum precision is obtained. This means that you continue until the magnitude of the difference between two successive x; is minimal. (Remember, the spacing at a floating-point number, x, is approximated by ex.) Print out your answer and what the sart function in your library gives you for comparison, with as many digits as you can
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
