Numerical Analysis¶
Reference
Numerical analysis, Richard L. Burden, J. Douglas Faires
误差 | Preliminary: Errors¶
If a real number \(x\) is denoted as \(0.d_1d_2d_3\cdots \times 10^{n}\), then
- Truncation(截断) Error
is induced when
\[
\hat{x}=0.d_1d_2d_3\cdots d_k \times 10^{n}
\]
for some definite \(k<\infty\)
- Roundoff(舍入) Error
is induced when
\[
\hat{x}=0. \delta_1 \delta_2 \delta_3 \cdots \delta_k \times 10^{n}
\]
for some definite \(k<\infty\)
where \(\delta_k >d_k\) if \(d_{k+1}>=5\).
t significant digits¶
The number \(p^*\) is said to approximate p to \(t\) significant digits(or figures) if \(t\) is the largest nonnegative integer for which the relative error
\[
e = \frac{\Delta p}{p}=\frac{\|p-p^*\|}{\|p\|}<5\times 10^{-t}
\]
where \(p^*\) is the approximate number of the exact number \(p\).
- for Chopping:
\[
\begin{align*} e &=
\left|\frac{0.d_{k+1}d_{k+2}\cdots}{0.d_1d_2\cdots}\right| \times
10^{-k} \\
&\leq \frac{1}{0.1} \times 10^{-k} \quad \text{"=" for }
d_{k+1}d_{k+2}\cdots\rightarrow\overline{9}\text{ and
}d_{1}d_{2}\cdots\rightarrow 0 \\ &=10^{-k+1}
\end{align*}
\]
- for rounding:
\[
\begin{align*} e &\leq \frac{0.5}{0.1} \times 10^{-k} \quad \text{"=" for } d_{k+1}d_{k+2}\cdots\rightarrow 5\overline{0}\text{ and }d_{1}d_{2}\cdots\rightarrow 0 \\ &=0.5\times 10^{-k+1} \end{align*}
\]