Question: Write a matlab routine in double precision to implement the following algorithm for computing integer k; real a,b,c,d,e,f,g; for k=1 to 5 do output k,
Write a matlab routine in double precision to implement the following algorithm for computing 
integer k; real a,b,c,d,e,f,g;





for k=1 to 5 do







output k, f, |f-pi|, g, |g-pi|
end for
which converges faster, f or g?
How accurate are the final values?
Also compare with the double precision computation or 4arctan(1).
(note that the value of pi correct to 36 digits is 3.141592653589793236846264338327950288)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
