正在加载图片...
Lecture note 1 Numerical Analysis Round off errors The use of binary digits tends to conceal the computational difficulties.To examine this,for simplicity,we now assume k-digit decimal machine numbers: ±0.d1d2.dk×10,1≤d1≤9,0≤d:≤9. Any real number can be represented by y=0.d山d.…dkdk+1.×10m Obtain decimal machine number by 。Chopping:chop off the digits dk.+1,·, fl(y)=0.d1d2..dk×10m Example:(5-digit) 元=0.314159265..×101 f1(π)=0.31415×101 ·Rounding:dk+1≥5,add dk by 1 and chopping d+1<5 chopping. Example: fl(π)=0.31416×101 If p*is an approximation to p,the following definition describes two methods for measuring approximation errors: ·Absolute error lp-pl ·Relative error rf,provided that p≠0. Example:let p=0.3000 x 101 and p*=0.3100 x 101.Absolute error is 0.1,and the relative error is 0.3333 x 10-1. Significant digits The significant figures (also known as significant digits)of a number are those digits that carry meaning contributing to its precision. Precision of approximation:The number p*is said to approximate p to t significant digits(or figures)if t is the largest nonnegative integer for which ≤5xw- For a number y=0.dd2…dkdk+1…×10", -k decimal digits by chopping fl(y)=0.d1…dk ly-fl(y)l 0.dk+idx+2...1om-k 1 0.d边…d4×10m≤0×10-*=10-k-1) 9Lecture note 1 Numerical Analysis Round off errors The use of binary digits tends to conceal the computational difficulties. To examine this, for simplicity, we now assume k-digit decimal machine numbers: ±0.d1d2 . . . dk × 10n , 1 ≤ d1 ≤ 9, 0 ≤ di ≤ 9. Any real number can be represented by y = 0.d1d2 . . . dkdk+1 . . . × 10n Obtain decimal machine number by • Chopping: chop off the digits dk+1, · · · , fl(y) = 0.d1d2 . . . dk × 10n Example: (5-digit) π = 0.314159265 . . .. × 101 fl(π) = 0.31415 × 101 • Rounding: dk+1 ≥ 5, add dk by 1 and chopping dk+1 < 5 chopping. Example: fl(π) = 0.31416 × 101 If p ∗ is an approximation to p, the following definition describes two methods for measuring approximation errors: • Absolute error |p − p ∗ | • Relative error |p−p ∗ | |p| , provided that p 6= 0. Example: let p = 0.3000 × 101 and p ∗ = 0.3100 × 101 . Absolute error is 0.1, and the relative error is 0.3333 × 10−1 . Significant digits The significant figures (also known as significant digits) of a number are those digits that carry meaning contributing to its precision. • Precision of approximation : The number p ∗ is said to approximate p to t significant digits (or figures) if t is the largest nonnegative integer for which |p − p ∗ | |p| ≤ 5 × 10−t For a number y = 0.d1d2 · · · dkdk+1 · · · × 10n, – k decimal digits by chopping fl(y) = 0.d1 · · · dk |y − fl(y)| |y| = 0.dk+1dk+2 · · · 10n−k 0.d1d2 · · · dk × 10n ≤ 1 0.1 × 10−k = 10−(k−1) 9
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有