This preview shows pages 1–13. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CHAPTER 4 CHAPTER 4 RoundOff and Truncation Errors Errors Errors Truncation errors Truncation errors depend on numerical method Roundoff errors Roundoff errors due to rounding or chopping Significant digits Significant digits (machinedependent) 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 Significant Figures Significant Figures 48.9 mph? 48.905 mph? Significant Digits Significant Digits The places which can be used with confidence 32bit machine: 7 significant digits 64bit machine: 17 significant digits Double precision: reduce roundoff error, but increase CPU time 5904 7182818284 2 e 7310 4142135623 1 2 2643 8979323846 1415926535 3 . . . = = = 3.25/1.96 = 1.65816326530162... (from MATLAB) But in practice only report 1.65 (chopping) or 1.66 (rounding)! Why?? Because we dont know what is beyond the second decimal place False Significant Figures 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 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 Accuracy and Precision More Accurate More Precise 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. Exact n true biased 7.38906 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 Approximation = true value + true error Approximation = true value + true error E t = true value  approximation = x*  x or in percent * * x x x Value True Error True Error elative R t = = = % * 100 * x x x t  = Numerical Errors Numerical Errors The difference between the true value and the approximation % 100 % 100 a ion approximat present approx. previous approx. present ion approximat error e approximat = = Approximate Error Approximate Error But the true value is not known If we knew it, we wouldnt have a problem Use approximate error % 100 x x x error Relative new old new a  = Roundoff Errors Roundoff Errors Computers can represent numbers to a finite precision Most important for real numbers  integer math can be exact, but limited...
View
Full
Document
This note was uploaded on 03/07/2009 for the course CVEN 302 taught by Professor Edge during the Spring '08 term at Texas A&M.
 Spring '08
 EDGE

Click to edit the document details