Question: (7) One way in which computers can compute the values of functions like the sine, cosine, logarithm and so on is to use a power

 (7) One way in which computers can compute the values of

(7) One way in which computers can compute the values of functions like the sine, cosine, logarithm and so on is to use a power series expansion. This is an infinite series from which the first few terms are calculated and used to find an approximate value for the function. The series expansion for the exponential function is e=exp(x) = 1 + x+x'/21 +x'131 +x14/! + +x'! + Note that the nth term of the series is obtained by multiplying the previous term by x/(n-1). Write a VBA function called MyExp with an input of data type Double which returns the value of the exponential of its input. Use the series given above and terminate the summation when the absolute value of the term to be added becomes less than 10*. Test it with the following values: exp(0) = 1.00000, exp( 1 ) = 2.7 1 828, exp(5)-148.41 3 1 6 (to 5 decimal places)

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!