Question: A very old method to compute squareroot s is the divide and average method. It is an iterative technique that works as follows. Suppose you

 A very old method to compute squareroot s is the "divide

A very old method to compute squareroot s is the "divide and average" method. It is an iterative technique that works as follows. Suppose you want to find the squareroot of a. Make a guess, call it x. Then get better and better approximations using the iterative formula: x_new = x_old + a/x_old/2 We continue finding new values of x until it converges to a single number, which should be squareroot a. For example. Suppose you want to find the squareroot of 3, Make a guess, say x = 1.5. Then a better approximation is x_new = 1.5 + 3/1.5/2 = 1.75 Now repeat the process with this new value of x: x_new = 1.75 + 3/1.75/2 = 1.73214 and continue until the numbers don't change too much. The next value we get would be x = 1.73205. Notice that the first four digits have not changed. We can guess that squareroot 3 almostequalto 1.732. In fact, this is the correct value to 4 significant figures. Your Problem: Write a function (or a subroutine) in VBA that evaluates the squareroot of a using the above iterative technique (you can do this by modifying the code in figure 3.4 of your book). Make your first guess a/2 and choose epsilon_s so that the solution is accurate to at least 5 significant figures. Then use your function to approximate squareroot 27

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!