Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

image text in transcribed

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions