Beruflich Dokumente
Kultur Dokumente
Types of Errors
Data Error vs. Computational Error = , = = , =
Error =
= + Computational (Sine Example) () Data
1 1 2
Quantity:
1 1 2
IEEE System
Many computer systems (including MATLAB) run on this system Base is 2 Single Precision = 32 bit word Double Precision = 64 bit word
1 bit for sign (0 = +, 1 = -) 11 bits for exponent, e = 2^11 possibilities 52 bits for the number (d0 to d51) Eps = * 2^(1-52) = 2^(-52)
IEEE System
Exponent possibilities 2^11 = 2048 exponent = b 1023 b = 11 bit number Infinity = 11111111111 = 2047-1023 = 1024 0 = 00000000000 = 0-1023 = -1023 Normal Numbers are in the exponent range 1023 -1022 1024 reserved for infinity, -1023 reserved for 0
Lets look at this sum in MATLAB for: x = 10 and x = -10 Can you foresee a problem? (exptest.m)
Cancelation Error
Previous slides error for x = -10 can also be called cancelation error (loss of digits due to canceling of the beginning digits) Sometimes you can avoid cancellation error, by being smart with your arithmetic Example: 1 +