lecture 2

lecture 2 - Chapter 3 Round-Off and Truncation Errors...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapter 3 Round-Off and Truncation Errors
Background image of page 2
Errors Truncation errors - depend on numerical method Round-off errors - due to rounding or chopping Significant digits (machine-dependent) There is a difference between 109 o F and 109.000 o F (or 55 mph and 55.00 mph) You need to decide in the problem how many significant figures are important Engineering design requirements Beware of false significant figures in answers
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Significant Figures 48.9 mph? 48.95 mph?
Background image of page 4
Significant Digits The places which can be used with confidence 32-bit machine: 7 significant digits 64-bit machine: 17 significant digits Double precision: reduce round-off error, but increase CPU time 5904 7182818284 2 e 7310 4142135623 1 2 2643 8979323846 1415926535 3 . . .
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.25/1.96 = 1.65816326530162. .. (from MATLAB) But in practice only report 1.65 (chopping) or 1.66 (rounding)! Why?? Because we don’t know what is beyond the second decimal place False Significant Figures ... 6558 6522403258 . 1 964 . 1 / 245 . 3 ... 7724 6644501278 . 1 955 . 1 / 254 . 3 Rounding ... 1869 6505840528 . 1 969 . 1 / 250 . 3 ... 4082 6627551020 . 1 960 . 1 / 259 . 3 Chopping
Background image of page 6
Accuracy - How closely a measured or computed value agrees with the true value Precision - How closely individual measured or computed values agree with each other Accuracy is getting all your shots near the target. Precision is getting them close together. Accuracy and precision More Accurate More Precise
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: Precise but not accurate A biased estimate of exp(x) is the true series is the biased series ... ! 3 x ! 2 x x 1 e 3 2 x ... ! 3 x ! 2 x x 2 e 3 2 x We may have a numerical method that is precise but not accurate, or vice versa. Both of these are bad.
Background image of page 8
Exact n true biased 7.38906 0 1 2 7.38906 1 3 4 7.38906 2 5 6 7.38906 3 6.33333 7.33333 7.38906 4 7 8 7.38906 5 7.26667 8.26667 7.38906 6 7.35556 8.36667 7.38906 7 7.38095 8.38095 7.38906 8 7.38730 8.38730 Exact solution: x = 2, e 2 = 7.38906
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Approximation = true value + true error E t = true value approximation = x* x or in percent * * x x x Value True Error True elative R % * 100 * x x x t Numerical Errors The difference between the true value and the approximation
Background image of page 10
% 100 % 100 a ion approximat present approx. previous present error e Approximate Error But the true value is not known If we knew it, we wouldn’t have a problem Use approximate error % 100 x x x error Relative new old new
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Round-off Errors Computers can represent numbers to a finite precision Most important for real numbers - integer math can be exact, but limited How do computers represent numbers? Binary representation of the integers and real numbers in computer memory
Background image of page 12
Number Systems Base-10 (Decimal): 0,1,2,3,4,5,6,7,8,9 Base-8 (Octal): 0,1,2,3,4,5,6,7 Base-2 (Binary): 0,1 – off/on, close/open, negative/positive charge Other non-decimal systems 1 lb = 16 oz, 1 ft = 12 in, ½”, ¼”, ….. 16 11 2 1 2 1 2 0 2 1 1011 . 0
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 98

lecture 2 - Chapter 3 Round-Off and Truncation Errors...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online