Question: Using VBA, write the code that solve the situation. Thnaks Problem #2 Use your answer above for the machine epsilon of your double precision variable
Using VBA, write the code that solve the situation. Thnaks
Problem #2
Use your answer above for the machine epsilon of your double precision variable as the stopping criteria for estimating e1 . You can start with the pseudocode presented in class: Sub expX() term=1 sum=1 x=power of exp For n = 1 to 30 step 1 term = term*x/n sum = sum + term write n,term,sum Next n End sub
but you'll need to modify it to stop when
|% approximate relative error| <= machine epsilon *100
You can calculate % approximate relative error as
(present approx. - previous approx.)/(present approx.) *100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
