Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
numerically equivalent ˆ= same result when executed with the same machine arithmetic<br />
This introduces a new and important aspect in the study of numerical algorithms!<br />
The above statement means that whenever we study the impact of roundoff errors on LUfactorization<br />
it is safe to consider only the basic version without pivoting, because we can<br />
always assume that row swaps have been conducted beforehand.<br />
“Computers use floating point numbers (scientific notation)”<br />
△<br />
Example 2.4.1 (Decimal floating point numbers).<br />
3-digit normalized decimal floating point numbers:<br />
2.4 Supplement: Machine Arithmetic<br />
valid: 0.723 · 10 2 , 0.100 · 10 −20 , −0.801 · 10 5<br />
invalid: 0.033 · 10 2 , 1.333 · 10 −4 , −0.002 · 10 3<br />
A very detailed exposition and in-depth discussion of the all the material in this section can be found<br />
in [24]:<br />
• [24, Ch. 1]: excellent collection of examples concerning the impact of roundoff errors.<br />
• [24, Ch. 2]: floating point arithmetic, see Def. 2.4.1 below and the remarks following it.<br />
Ôº½¼ ¾º<br />
General form of m-digit normalized decimal floating point number:<br />
never = 0 !<br />
x = ± 0 . 1 1 1 1 1 ... 1 1 · 10<br />
E<br />
} {{ }<br />
m digits of mantissa exponent ∈ Z<br />
Ôº½¼ ¾º<br />
✸<br />
✗<br />
✖<br />
✔✗<br />
Computer = finite automaton ➢ can handle only finitely many numbers, not R<br />
✕✖<br />
✕<br />
machine numbers, set M<br />
Essential property:<br />
M is a discrete subset of R<br />
M not closed under elementary arithmetic operations +, −, ·,/.<br />
roundoff errors (ger.: Rundungsfehler) are inevitable<br />
The impact of roundoff means that mathematical identities may not carry over to the computational<br />
realm. Putting it bluntly,<br />
✗<br />
✖<br />
Computers cannot compute “properly” !<br />
✔<br />
✕<br />
✔<br />
Of course,<br />
computers are restricted to a finite range of exponents.<br />
Definition 2.4.1 (Machine numbers).<br />
Given ☞ basis B ∈ N \ {1},<br />
☞ exponent range {e min , ...,e max }, e min ,e max ∈ Z, e min < e max ,<br />
☞ number m ∈ N of digits (for mantissa),<br />
the corresponding set of machine numbers is<br />
M := {d · B E : d = i · B −m , i = B m−1 ,...,B m − 1, E ∈ {e min ,...,e max }}<br />
never = 0 !<br />
1 1 . .. 1 1<br />
} {{ }<br />
digits for exponent<br />
machine number ∈ M : x = ± 0 . 1 1 1 1 1 . .. 1 1 · B<br />
} {{ }<br />
m digits for mantissa<br />
✬<br />
✫<br />
numerical computations<br />
≠<br />
analysis<br />
linear algebra<br />
✩<br />
✪<br />
Ôº½¼ ¾º<br />
Largest machine number (in modulus) : x max = (1 − B −m ) · B e max<br />
Smallest machine number (in modulus) : x min = B −1 · B e min<br />
Distribution of machine numbers:<br />
Ôº½¼ ¾º