正在加载图片...
Lecture note 1 Numerical Analysis -k decimal digits by rounding y-f@1≤5×10-k Does not depend on the scale n!! Significant digits for a number:The number of significant digits in an answer to a calculation will depend on the number of significant digits in the given data How to recognize the significant digits? 1.If a number is expressed in decimal machine number,all digits are sig- nificant.For example for 1300,two significant representation 0.13 x 104; four significant representation 0.1300 x 104. 2.For a general number,non-zero digits are always significant.Thus,22 has two significant digits.and 22.3 has three significant digits.With zeroes,the situation is more complicated: -Zeroes placed before other digits are not significant;0.046 has two significant digits. Zeroes placed between other digits are always significant;4009 kg has four significant digits. Zeroes placed after other digits but behind a decimal point are sig- nificant:7.90 has three significant digits.Zeroes at the end of a number are significant only if they are behind a decimal point.Oth- erwise,it is impossible to tell if they are significant.For example,in the number 8200,it is not clear if the zeroes are significant or not. The number of significant digits in 8200 is at least two,but could be three or four.To avoid uncertainty,use decimal machine number to place significant zeroes behind a decimal point:0.8200 x 10 has four significant digits 0.820 x 104 has three significant digits 0.82 x 104 has two significant digits. Finite (significant)digit arithmetic .fl(z)is the float point representation of z. ·x⊕y=fl(fl(x)+fl(y) This the output of“x+y”by a computer ·x⑧y=fl(fl(x)×fl(y)and more. Loss of significant digit Cancelation of significant digits due to subtraction of nearly equal numbers. 10Lecture note 1 Numerical Analysis – k decimal digits by rounding | y − fl(y) y | ≤ 5 × 10−k Does not depend on the scale n!! • Significant digits for a number: The number of significant digits in an answer to a calculation will depend on the number of significant digits in the given data. How to recognize the significant digits? 1. If a number is expressed in decimal machine number, all digits are sig￾nificant. For example for 1300, two significant representation 0.13 × 104 ; four significant representation 0.1300 × 104 . 2. For a general number, non-zero digits are always significant. Thus, 22 has two significant digits, and 22.3 has three significant digits. With zeroes, the situation is more complicated: – Zeroes placed before other digits are not significant; 0.046 has two significant digits. – Zeroes placed between other digits are always significant; 4009 kg has four significant digits. – Zeroes placed after other digits but behind a decimal point are sig￾nificant; 7.90 has three significant digits. Zeroes at the end of a number are significant only if they are behind a decimal point. Oth￾erwise, it is impossible to tell if they are significant. For example, in the number 8200, it is not clear if the zeroes are significant or not. The number of significant digits in 8200 is at least two, but could be three or four. To avoid uncertainty, use decimal machine number to place significant zeroes behind a decimal point: 0.8200×104 has four significant digits 0.820 × 104 has three significant digits 0.82 × 104 has two significant digits. Finite (significant) digit arithmetic • fl(x) is the float point representation of x. • x ⊕ y = fl(fl(x) + fl(y)) This the output of “x + y” by a computer • x ⊗ y = fl(fl(x) × fl(y)) and more.. Loss of significant digit Cancelation of significant digits due to subtraction of nearly equal numbers. 10
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有