Program of find the truncation error in a series of approximation in numerical computing using c++ languages
Answers
Answered by
4
Answer:
The value of Exponential Function e^x can be expressed using following Taylor Series.
e^x = 1 + x/1! + x^2/2! + x^3/3! + ......
How to efficiently calculate the sum of above series?
The series can be re-written as
e^x = 1 + (x/1) (1 + (x/2) (1 + (x/3) (........) ) )
Let the sum needs to be calculated for n terms, we can calculate sum using following loop.
for (i = n - 1, sum = 1; i > 0; --i )
sum = 1 + x * sum / i;
Answered by
0
Explanation:
Truncation error is the difference between a truncated value and the actual value.As an example of truncation error, consider the speed of light in a vacuum. The official value is 299,792,458 meters per second. In scientific (power-of-10) notation, that quantity is expressed as 2.99792458 x 108.
Similar questions