Question: a)Design an algorithm and present it in the form of a flowchart that receives the value of x and the error willing to accept. The

 a)Design an algorithm and present it in the form of a

a)Design an algorithm and present it in the form of a flowchart that receives the value of x and the error willing to accept. The algorithm must return the number of terms that are required to satisfy the specified error, the estimate obtained and the error associated with that estimate. You cannot use default functions for calculation of factorials. The error is calculated as abs((estimated-target)/target). Present a desk proof for x=5 and an error of 1%. For the error calculation in the desktop test, use a target value of exp(5) = 148.413159. Use 6 decimal places in desk test calculations.

b)Write a function that takes the value of x and the error you are willing to accept, and returns: (1) the number of terms that are required to satisfy the specified error, (2) the estimate obtained, and (3) the error associated with that estimate. You cannot use default functions for the calculation of factorials. The error is calculated as abs((estimated-target)/target). In your code, compute the target value using numpy's default function: np.exp. Present a desk proof for x=4 and an error of 1%. For the calculation of errors in the desktop test, use a target value of exp(4) = 54.598150. Use 6 decimal places in desk test calculations.

ex=exp(x)=1+1x+2x2+6x3+24x4+

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!