第1周部分作业答案
4. (1) 已知近似值*x 有5位有效数字,试求其相对误差限.
(2) 已知近似值*x 的相对误差限是0.03%,问*x 至少有几位有效数字?
解 设*x 是x 近似值,且*120.10m
n x a a a =±⨯ ,其中n a a a ,,,21 是0到9之间的自然
数,11a ≥,m 为整数。
(1) 因为*x 有5位有效数字,所以由定理1.2.1 (1) 知:
*
51
4
4
*1
1
111110
10
10
0.005%22
2
x x a a x
-+---≤
⨯=
⨯
⨯≤
⨯=,
即*x 的相对误差限为0.005%.
(2) 因为*121210.100.100.(1)10m m m n n x a a a a a a a =±⨯=⨯<+⨯ ,且*
x 的相对误差限为0.03%,所以
*
*
*3
3
11*
0.03%0.(1)10
0.30.(1)10
0.510
m
m m x x x x
x a a x
----=
⨯<⨯+⨯=⨯+⨯<⨯,
故由定义1.2.3知:即*
x 至少有3位有效数字。
3. (1) Suppose the approximation *x has 5 significant digits, try to find the
relative error bound of *x .
(2) Determine the minimal number of significant digits of the approximation *x
such that the relative error bound of *x is 0.03%.
Solution. Suppose
*
1210.10,
19,09,
2,3,,m
n i x a a a a a i n
=±⨯≤≤≤≤= ,
is the approximation to x .
(1) Since *x has 5 significant digits, part (1) of Theorem 1.2.1 gives
*
51
4
4
*1
1
111110
10
10
0.005%
22
2
x x a a x
-+---≤
⨯=
⨯
⨯≤
⨯=,
that is, the relative error bound of *x is 0.005% from Definition 1.2.3.
(2) Since
*
121210.10
0.10
0.(1)10
m
m
m
n n x a a a a a a a =±⨯=⨯<+⨯ ,
and the relative error bound of *x is 0.03%, we have
*
*
*3
3
11*
0.03%0.(1)10
0.30.(1)10
0.510
m
m m x x x x
x a a x
----=
⨯<⨯+⨯=⨯+⨯<⨯,
that is, *x retains at least 3 significant digits from Definition 1.2.5.。