TAOCP 4.2.2: Accuracy of Floating Point Arithmetic
Section 4.2.2 exercises: 32/32 solved.
Section 4.2.2. Accuracy of Floating Point Arithmetic
Exercises from TAOCP Volume 2 Section 4.2.2: 32/32 solved.
| # | Rating | Category | Status | Time |
|---|---|---|---|---|
| 1 | [M18] | math-medium | verified | 1m40s |
| 2 | [M20] | math-medium | verified | 3m23s |
| 3 | [M30] | math-hard | verified | 3m31s |
| 4 | [10] | simple | verified | 7m |
| 5 | ▶ [M20] | math-medium | verified | 6m43s |
| 6 | [M22] | math-medium | verified | 3m40s |
| 7 | [M21] | math-medium | verified | 5m07s |
| 8 | ▶ [20] | medium | verified | 3m52s |
| 9 | [M22] | math-medium | verified | 3m48s |
| 10 | ▶ [M25] | math-medium | solved | 10m18s |
| 11 | [M20] | math-medium | verified | 1m53s |
| 12 | [M24] | math-medium | verified | 4m13s |
| 13 | ▶ [M25] | math-medium | solved | 6m09s |
| 14 | [M27] | math-hard | verified | 2m14s |
| 15 | ▶ [M24] | math-medium | verified | 2m26s |
| 16 | [M28] | math-hard | verified | 6m08s |
| 17 | [28] | hard | verified | 5m56s |
| 18 | [M40] | math-project | verified | 2m11s |
| 19 | ▶ [M30] | math-hard | solved | 6m29s |
| 20 | [25] | medium | verified | 1m50s |
| 21 | [M35] | math-hard | solved | 9m50s |
| 22 | [M30] | math-hard | solved | 8m37s |
| 23 | ▶ [M26] | math-hard | verified | 2m15s |
| 24 | [M27] | math-hard | verified | 3m24s |
| 25 | ▶ [**] | verified | 1m40s | |
| 26 | [M22] | math-medium | verified | 2m15s |
| 27 | [M27] | math-hard | solved | 7m03s |
| 28 | [HM30] | hm-hard | verified | 8m01s |
| 29 | ▶ [M25] | math-medium | verified | 2m02s |
| 30 | [M30] | math-hard | solved | 2m51s |
| 31 | [M25] | math-medium | solved | 9m51s |
| 32 | [M21] | math-medium | verified | 3m57s |
TAOCP 4.2.2 Exercise 1
We are asked to prove identity (7): $u \ominus v = -(v \ominus u)$ using only identities (2) through (6): \begin{aligned} &(2) && u \oplus v = v \oplus u, \\
TAOCP 4.2.2 Exercise 2
Since $y \ge 0$, property (8) implies that v \oplus 0 \le v \oplus y.
TAOCP 4.2.2 Exercise 3
We are asked to find eight-digit floating point numbers $u$, $v$, $w$ such that $u \oplus (v \oplus w) \ne (u \oplus v) \oplus w,$ where $\oplus$ denotes floating point addition in the sense of Sectio...
TAOCP 4.2.2 Exercise 4
Yes.
TAOCP 4.2.2 Exercise 5
We are asked whether the identity u \oslash v = u \otimes (1 \oslash v) holds for **all** floating-point numbers $u$ and $v \ne 0$, assuming no exponent overflow or underflow occurs.
TAOCP 4.2.2 Exercise 6
By equation (6) of the floating point arithmetic defined in this section, 0 \oplus u = u for every floating point number $u$.
TAOCP 4.2.2 Exercise 7
We seek floating binary numbers $u$ and $v$ for which (u\oplus v)^2>2(u^2\oplus v^2), where $\oplus$ denotes floating-point addition with rounding to the nearest floating binary number.
TAOCP 4.2.2 Exercise 8
We are asked to determine which of the relations $u < v, \qquad u \sim v, \qquad u > v, \qquad u \approx v$ hold for the given pairs of eight-digit, one's-complement floating point numbers, assuming $...
TAOCP 4.2.2 Exercise 9
Let the approximation relation be defined as in §4.
TAOCP 4.2.2 Exercise 10
Let $b$ be the floating-point radix and $p$ the precision of the significand.
TAOCP 4.2.2 Exercise 11
Let the floating point number $x$ have least significant digit in position $e$.
TAOCP 4.2.2 Exercise 12
Assume, without loss of generality, that $e_u \ge e_v+p$.
TAOCP 4.2.2 Exercise 13
Error in message stream
TAOCP 4.2.2 Exercise 14
Let $\eta=\frac12\,b^{\,1-p},$ so that every unnormalized floating point multiplication or division satisfies \qquad |\delta|\le \eta,
TAOCP 4.2.2 Exercise 15
We are asked whether the computed midpoint of an interval always lies between the endpoints; that is, whether $(u \le v) \implies u \lesssim (u \oplus v) \oslash 2 \lesssim v,$ where $\oplus$ and $\os...
TAOCP 4.2.2 Exercise 16
Let P_1=x_1=1.
TAOCP 4.2.2 Exercise 17
Let the floating point number in location ACC be u=s_u\,m_u\,b^{e_u}, and let the floating point number in register A be
TAOCP 4.2.2 Exercise 18
In unnormalized arithmetic, floating point addition and multiplication are still defined by but numbers need not be normalized.
TAOCP 4.2.2 Exercise 19
Let t_k=s_k-c_k .
TAOCP 4.2.2 Exercise 20
Equation (17) asserts that for every real number $x$ in the range $b^{e-1}\le |x|<b^e,$ the rounded value satisfies $\operatorname{round}(x)=x(1+\delta(x)),$ with $\delta(x)$ defined by
TAOCP 4.2.2 Exercise 21
We are asked to compute an exact decomposition of the product of two floating-point numbers $u$ and $v$ in the form uv = w + w', using only the floating-point operations $\oplus$, $\ominus$, and $\oti...
TAOCP 4.2.2 Exercise 22
We are asked: > Can drift occur in floating point multiplication/division?
TAOCP 4.2.2 Exercise 23
Let $u$ be a floating point number.
TAOCP 4.2.2 Exercise 24
Let $\mathcal{F}$ denote the set of all normalized floating point numbers, together with the special symbols $+0$, $-0$, $+\infty$, and $-\infty$.
TAOCP 4.2.2 Exercise 25
When people speak of "cancellation" in floating point subtraction, they refer not to an actual inaccuracy in the operation $u \ominus v$ itself, which is computed exactly according to equation (3), bu...
TAOCP 4.2.2 Exercise 26
Let $u$, $u'$, $v$, and $v'$ be positive normalized floating point numbers, with $u \sim u' \ (\text{relative error } r), \qquad v \sim v' \ (\text{relative error } s).$ By definition of relative erro...
TAOCP 4.2.2 Exercise 27
**Statement:** Prove that 1 \ominus (1 \ominus (1 \ominus u)) = 1 \ominus u for all nonzero floating point numbers $u$, where $\ominus$ denotes floating point subtraction as defined in Section 4.
TAOCP 4.2.2 Exercise 28
Let the floating-point numbers in the interval $[x_0,x_1]$ be \xi_0<\xi_1<\cdots<\xi_m.
TAOCP 4.2.2 Exercise 29
We want to show that the requirement $b^p \ge 3$ in Exercise 28 is necessary by giving an example in which repeated application of $h(x) = \tilde{g}(\tilde{f}(x))$ exhibits drift when $b^p = 2$.
TAOCP 4.2.2 Exercise 30
Let $f(x) = 1 + x + x^2 + \cdots + x^{106} = \frac{1 - x^{107}}{1 - x}, \quad x < 1,$ and define $g(y) = f\bigl((\tfrac{1}{3} - y^2)(3 + 3.45y^2)\bigr), \quad 0 < y < 1.$ We are asked to evaluate $g(y...
TAOCP 4.2.2 Exercise 31
The point of Kulisch's example is not merely that a subtraction of nearly equal quantities occurs.
TAOCP 4.2.2 Exercise 32
We are asked to determine all pairs $(a,b)$ such that $\text{round}(b, \text{even}(x)) = \lfloor ax + b \rfloor + \lfloor ax - b \rfloor \quad \text{for all } x. \eqno(32.1)$ We interpret round$(b, \t...