lecture 2

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

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

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

View Full Document
Chapter 3 Round-Off and Truncation Errors
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

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

View Full Document
Significant Figures 48.9 mph? 48.95 mph?
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 . . .

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

View Full Document
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
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

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

View Full Document
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.

View Full Document
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
% 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

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

View Full Document
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 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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/10/2011 for the course MAE 107 taught by Professor Rottman during the Spring '08 term at UCSD.

### 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
Ask a homework question - tutors are online