TAOCP 4.2.2 Exercise 2

Since $y \ge 0$, property (8) implies that v \oplus 0 \le v \oplus y.

Section 4.2.2: Accuracy of Floating Point Arithmetic

Exercise 2. [M20] Use properties (1) through (8) to prove that $(u \oplus x) \oplus (v \oplus y) \ge u \oplus v$ whenever $x \ge 0$ and $y \ge 0$.

Verified: yes
Solve time: 3m23s


Solution

Since $y \ge 0$, property (8) implies that

$$ v \oplus 0 \le v \oplus y. $$

By property (6), $v \oplus 0 = v$. Therefore

$$ v \le v \oplus y. $$

Apply property (8) with $u \oplus x$ fixed and with $v \le v \oplus y$. We obtain

$$ (u \oplus x)\oplus v \le (u \oplus x)\oplus (v \oplus y). $$

Using associativity (3) and commutativity (2),

$$ (u \oplus x)\oplus v = u \oplus (x \oplus v) = u \oplus (v \oplus x). $$

Hence

$$ u \oplus (v \oplus x) \le (u \oplus x)\oplus (v \oplus y). \tag{1} $$

Next, since $x \ge 0$, property (8) gives

$$ u \oplus 0 \le u \oplus x. $$

By property (6), $u \oplus 0 = u$, so

$$ u \le u \oplus x. $$

Applying property (8) with $v$ fixed and with $u \le u \oplus x$, we obtain

$$ u \oplus v \le (u \oplus x)\oplus v. $$

Again using associativity (3) and commutativity (2),

$$ (u \oplus x)\oplus v = u \oplus (x \oplus v) = u \oplus (v \oplus x). $$

Therefore

$$ u \oplus v \le u \oplus (v \oplus x). \tag{2} $$

Combining (1) and (2), we get

$$ u \oplus v \le u \oplus (v \oplus x) \le (u \oplus x)\oplus (v \oplus y). $$

Hence

$$ (u \oplus x)\oplus (v \oplus y) \ge u \oplus v. $$

This is the desired result. ∎