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

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

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!