1.2/
Binary Machine Numbers
-
- Representing Real Numbers:
- A \(\ \ \ \ \ \ \ \ \ \ \ \ \\) (binary digit) representation is used for a real number.
- The first bit is
- Followed by:
- and a \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\), called the
- The base for the exponent is
- Floating-Point Number Form:
- Smallest Normalized positive Number:
- When:
- Equivalent to:
- Largest Normalized positive Number:
- When:
- Equivalent to:
- UnderFlow:
- When numbers occurring in calculations have
- OverFlow:
- When numbers occurring in calculations have
- Representing the Zero:
- There are \(\ \ \ \ \\) Representations of the number zero:
- There are \(\ \ \ \ \\) Representations of the number zero:
Decimal Machine Numbers
- What?
- (k-digit) Decimal Machine Numbers:
- Normalized Form:
- Floating-Point Form of a Decimal Machine Number:
- The floating-point form of y, denoted \(f_l(y)\), is obtained by:
- The floating-point form of y, denoted \(f_l(y)\), is obtained by:
- Termination:
There are two common ways of performing this termination:- \(\ \ \ \ \ \ \ \ \ \\):
This produces the floating-point form:
-
\(\ \ \ \ \ \ \ \ \ \\): \(\ \\) which
This produces the floating-point form:
For rounding, when \(d_{k+1} \geq 5\), we
When \(d_{k+1} < 5\), we
If we round down, then \(\delta_i =\)
However, if we round up,
- \(\ \ \ \ \ \ \ \ \ \\):
- Approximation Errors:
-
The Absolute Error: \(\ \ \ \ \ \ \\).
-
The Relative Error: \(\ \ \ \ \ \ \\).
-
- Significant Digits:
- Error in using Floating-Point Repr.:
-
- Chopping:
- The Relative Error =
- The Machine Repr. [for k decimial digits] =
- \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\).
\(\implies\)
Bound \(\ \ \ \implies \ \ \ \ \ \ \ \ \ \ \ \\).
- Rounding:
In a similar manner, a bound for the relative error when using k-digit rounding arithmetic is
Bound \(\ \ \ \implies \ \ \ \ \ \ \ \ \ \ \ \ \ \\).
-
- Distribution of Numbers:
The number of decimal machine numbers in \(\ \ \ \ \ \ \ \ \ \ \\) is \(\ \ \ \ \ \ \ \ \ \ \ \ \ \\) for
Finite-Digit Arithmetic
-
- Values:
- \[x = \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\]
- \[y = \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\]
- Operations:
- Error-producing Calculations:
- First:
- Second:
- First:
- Avoiding Round-Off Error:
- First:
- Second:
\(\implies \ \ \ \ \ \ \ \ \ \ \ \ \ \ x_1 = \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , \ \ \ \ \ \ \ \ \ \ \ \ \ \ x_2 = \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\)
- First:
Nested Arithmetic
- What?
Remember that chopping (or rounding) is performed:
- \[\ \ \ \ \ \ \\]
Polynomials should always be expressed \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\) , becasue, \(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\)
- Why?