Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions