Question: In numerical analysis, the term truncation error is typically related to the error introduced by not using all the terms in a series expansion or

In numerical analysis, the term "truncation error" is typically related to the error introduced by not using all the terms in a series expansion or a limited number of iterations used in approximations to differential equation solutions. To illustrate this, I would like for you to calculate the truncation error in calculating the value of V2 using the following power series 00 (2k+1 1315 35315693 2*+1(k!)2 2 8 64 256409616384 Please use your program to determine how many terms in the power series are needed to use the full precision of a float and then of a double (i.e. when the number values stop changing). You will compare your answer to the actual value of V2 given 60 decimal places 2 1.414213562373095048801688724209698078569671875376948073176679 For this experiment, you can use a global double variable double sq_rt2 1.414213562373095048801688724209698078569671875376948073176679 1 directory, please call your source code lab1part3.cc. An example of the output of your program In your Lab1 might look like: Input the number of terms in the power series using FLOATS: 4 # terms 1 approx # % error # approx # % error-% Etc... Input the number of terms in the power series using DOUBLES: 4 # terms-1 approx = # % error # # terms-2 approx # % error # Etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
