CVEN
chap05classlecture

# chap05classlecture - CHAPTER 4 Round-Off and Truncation...

• Notes
• 52

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

CHAPTER 4 CHAPTER 4 Round-Off and Truncation Errors

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

Errors Errors Truncation errors Truncation errors - depend on numerical method Round-off errors Round-off errors - due to rounding or chopping Significant digits 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
Significant Figures Significant Figures 48.9 mph? 48.905 mph?

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

Significant Digits 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 . . . = = = π
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 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

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

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

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

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

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

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 wouldn’t have a problem Use approximate error % 100 x x x error Relative new old new a × - = ε

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

Round-off Errors 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
Number Systems 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, ½”, ¼”, …..

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

This is the end of the preview. Sign up to access the rest of the document.
• Fall '08
• EDGE
• Numerical Analysis, double precision, true value, integer representation integer

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern