Answer to Question #9063 in MatLAB | Mathematica | MathCAD | Maple for sara
I. Set a = 1, b = 1/sqrt(2), t = 1/4 and x = 1
II. Repeat the following commands until the difference between a and b is within some desired accuracy:
y = a
a = (a + b)/2
b = sqrt(b*y)
t = t - x*(y - a)^2
x = 2*x
III. From the resulting values of a, b and t, an estimate of pi is
Pi_est = ((a + b)^2)/(4*t)
How many repeats are needed to estimate pi to an accuracy of 1e-8? 1e-15?
Submit it with all requirements as an assignment to our control panel and we'll assist you.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!