Question: Pl. Let us remember that the exponential function can be written by the series i! i=0 In the present problem we will approach the concept

 Pl. Let us remember that the exponential function can be written

Pl. Let us remember that the exponential function can be written by the series i! i=0 In the present problem we will approach the concept of cancellation using as a case study the function ex. a. Write a python program that calculates the exponential function using the series given above. b. Assuming it is added in the order given, what stopping criterion should be used? c. Test your program for the numbers: x = 1,5,10,15,20 and also for x=-1, -5, -10, -15, -20. and compare your results for the python function numpy.exp (x). d. As you have just seen in the previous point, the written function can have undesirable effects when work with negative numbers. Use the relation e- x= 1/ex and compare the results. I What happens to the reliability of the function implemented in part a) when the terms of the sum are regrouped into even and odd numbers? Implement this new version of your program and Compare the results for the case of negative numbers

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!