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 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
Get step-by-step solutions from verified subject matter experts
