Presentation is loading. Please wait.

Presentation is loading. Please wait.

Errors in Numerical Methods

Similar presentations


Presentation on theme: "Errors in Numerical Methods"— Presentation transcript:

1 Errors in Numerical Methods
Chapter 2 Errors in Numerical Methods and Their Impacts

2 Objectives Know finite-word length effect
Know computing errors, their causes and impacts to numerical calculation Know how to compute the errors Know the effect of error propagation Know how to avoid large errors

3 Content Introduction Finite word-length effect (Floating-point number representation) Error How to avoid error Conclusion

4 Introduction Why we need to know ?
Computers are great tools, however, without fundamental understanding of engineering problems, they will be useless.

5 Finite wordlength effect
How floating numbers are stored in a computer ? Sign bit Exponent Mantissa Base of the number system used IEEE 64-bit floating-point number representation

6 Finite wordlength effect

7 Finite wordlength effect
Ex: 402C S Exponent Mantissa 4 2 C 1 S = 0 E = Exp-1023= =3 M = Check with MATLAB command: “hex2num” F = +(1.11)2x23 = (1110)2=14

8 Finite wordlength effect(cont’d)
Step to convert from decimal number to IEEE stand. Check with MATLAB Use num2hex command S Exponent Mantissa 1 4 8

9 Finite wordlength effect(cont’d)
How to add 2 numbers :- This is done by bit alignment (only mantissa) with refer to the biggest number. Finally, the Mantissa words are added in 2’s system. Example : 1015 Ans: x Example : 1 Ans: x 1015 Example : (show only Mantissa) Ans: 1 1 1 Right shift 49 bits 1

10 Finite wordlength effect(cont’d)
1 1 430C6BF How to substract 2 numbers :- Complement and done by bit alignment with refer to the biggest number 1015 Example : 1 1 1 2’s of 1 1 1015-1 1

11 Finite wordlength effect(cont’d)
1 1 430C6BF52633FFF8 Will u try with the following problems?

12 Errors Error from numerical algorithm Truncation error Round-off error
Overflow/Underflow Loss of significance Negligible addition Error magnification

13 Errors: Numerical algorithm
Numerical integration on Error from exact solution = Error from exact solution =

14 Errors: Numerical algorithm
Numerical integration on

15 Errors: Truncation error
Truncation error is resulted from truncation series. Ex. Say x = 1 find exp(x)

16 Error: Loss of significance
Bad subtraction in finite wordlength can create loss of significance. See the following example: Try with x= 1,10,100,…1015

17 Error: Propagation error
Errors are propagated with the four arithmetic Operations. Let the exact values are X and Y, where their related values are x and y, respectively.

18 Errors 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.

19 Errors (cont’d)

20 Errors (cont’d) Error Definitions True Value = Approximation + Error
Et = True value – Approximation (+/-) MATLAB Example True error

21 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 …

22 Errors (cont’d) Apply approximation error to numerical approach (iterative) (+ / -) Meaning that the result is correct at least n significant figures Define criteria :- Compute until

23 Errors: Practical


Download ppt "Errors in Numerical Methods"

Similar presentations


Ads by Google