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 Write a matlab routine in double precision to implement the following algorithm

integer k; real a,b,c,d,e,f,g;

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)

for k=1 to 5 do

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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

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!