Chapter 2 Errors in Numerical Methods and Their Impacts
Objectives Know the difference between accuracy&precision Understand round-off error Understand truncation error and know how to apply Taylor’s series to estimate the error Understand the trade-off between truncation and round-off errors Understand the impact of errors in numerical methods
Content Introduction Errors Round-off errors Truncation errors Total errors Other errors Conclusion
Introduction Why we need to know ? Computers are great tools, however, without fundamental understanding of engineering problems, they will be useless.
Errors We ask for numerical methods since we cannot get exact solution !! Numerical methods only provide approximate results, not exact ones. So how we confident our results obtained from numerical methods ???? See in next slide how can we cope this with?
Errors (cont’d) Accuracy. How close is a computed or measured value to the true value Precision (or reproducibility). How close is a computed or measured value to previously computed or measured values. Inaccuracy (or bias). A systematic deviation from the actual value. Imprecision (or uncertainty or variance). Magnitude of scatter.
Errors (cont’d)
Number of “significant figures” indicates precision. Significant digits of a number are those that can be used with confidence, e.g., the number of certain digits plus one estimated digit. 53,800How many significant figures? 5.38 x x x Zeros are sometimes used to locate the decimal point not significant figures
Errors (cont’d) Error Definitions True Value = Approximation + Error E t = True value – Approximation (+/-) True error MATLAB Example
Errors (cont’d) What u can see is we can’t estimate the true error for all cases !! (why ?) So we use the following error definition instead. Approximation error …
Errors (cont’d) Apply approximation error to numerical approach (iterative) (+ / -) Define criteria :- Meaning that the result is correct at least n significant figures Compute until
Errors (cont’d) DIY: MATLAB (Parachutist problem) From your previous assignment, compare the approximation errors at t = 1,2,..,12 seconds for two cases, Δt = 0.5 and 0.1 respectively. Crticize why the approximation errors from these two cases are different !!
Round-off … Why round-off errors occur ? 1) There are numbers that can’t be expressed by a fixed number of significant figures 2) Base-2 number can’t precisely represent base-10 number. 3) Fraction number in computer is represent using a floating point form, e.g. exponent Base of the number system used mantissa Integer part where
Round-off … (cont’d) How floating numbers ‘re stored in a computer ?? exponent Base of the number system used mantissa Integer part
Round-off … (cont’d) How floating numbers ‘re stored in a computer (base-2 number) ??
Round-off … (cont’d) Examples: x10 3 Suppose only 4 decimal places to be stored Rounding/Chopping x x10 3 Now u can see how the round-off error occurs due to the limited room for mantissa !!!!