Question: 1.11 An approximation S to e can be computed by using the Taylor series for the exponential function: S:= 1 for k = 1,2, begin

 1.11 An approximation S to e can be computed by using

1.11 An approximation S to e can be computed by using the Taylor series for the exponential function: S:= 1 for k = 1,2, begin S := S+P end k The loop can be stopped when S = S + P to machine precision (a) Try this algorithm with x =-10 using single pre- cision arithmetic. What was k when you stopped? What is the relative error in the resulting approxima tion? Does this appear to be a good way to compute e 0 to full machine precision? (b) Repeat (a) with x = + 10 (c) Why are the results so much more reasonable for (b)? compute e0

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!