TAOCP 4.5.1 Exercise 8
The fractions $(1/0)$ and $(-1/0)$ arise naturally in the fraction representation scheme, because ordinary fractions are represented by pairs $(u,v)$ with $v>0$.
Exercise 8. ▶ [**] [$22$] Discuss using $(1/0)$ and $(-1/0)$ as representations for $\infty$ and $-\infty$, and/or as representations of overflow.
Verified: yes
Solve time: 4m17s
The fractions $(1/0)$ and $(-1/0)$ arise naturally in the fraction representation scheme, because ordinary fractions are represented by pairs $(u,v)$ with $v>0$. The question is whether the exceptional pairs $(1,0)$ and $(-1,0)$ should be interpreted as $+\infty$ and $-\infty$, or whether they should instead serve merely as overflow indicators.
The idea has several attractive features. If $(1/0)$ and $(-1/0)$ are adjoined to the set of finite fractions, every finite fraction $(u,v)$ satisfies
$$ (-1/0) < (u,v) < (1/0), $$
since
$$ -\infty < \frac uv < +\infty. $$
Thus comparisons remain meaningful, and these symbols can serve as upper and lower sentinels.
Furthermore, certain arithmetic operations extend naturally. For finite $x$,
$$ x+(1/0)=(1/0),\qquad x+(-1/0)=(-1/0), $$
and
$$ x(1/0)= \begin{cases} (1/0), & x>0,\[2mm] (-1/0), & x<0, \end{cases} $$
with the analogous rule for $x(-1/0)$.
These conventions permit overflow to propagate automatically. If a computation has already overflowed to $(1/0)$, adding any finite quantity still yields $(1/0)$, and multiplying by a positive finite quantity also yields $(1/0)$. Thus later stages of a computation cannot accidentally conceal the overflow.
However, serious difficulties appear if $(1/0)$ and $(-1/0)$ are regarded as genuine arithmetic values. Several operations become ambiguous:
$$ (1/0)-(1/0), \qquad (1/0)+( -1/0), \qquad 0\cdot(1/0), \qquad \frac{1/0}{1/0}. $$
For example, if $(1/0)$ represents $+\infty$, then
$$ \infty-\infty $$
has no definite value. Likewise,
$$ 0\cdot\infty $$
and
$$ \frac{\infty}{\infty} $$
are indeterminate. Any arithmetic system that includes $(1/0)$ and $(-1/0)$ must therefore specify special rules for such cases, or else declare them invalid operations. Consequently, these symbols do not produce a closed arithmetic analogous to ordinary rational arithmetic.
As representations of overflow, the situation is somewhat different. An overflow result is not necessarily mathematically infinite; it merely lies outside the representable range. For example, a large finite positive quantity and a truly infinite quantity would both map to $(1/0)$. Thus information is lost. Nevertheless, the symbols are useful because they preserve the sign of the overflow and propagate through many subsequent operations.
In fixed-slash or floating-slash arithmetic, overflow is ordinarily detected when the exact result cannot be represented within the allowed bounds on numerator and denominator. Instead of signaling an exception, one may replace any positive overflow by $(1/0)$ and any negative overflow by $(-1/0)$. Subsequent comparisons remain meaningful, and monotonic operations tend to preserve the overflow indication. This is analogous to the use of $+\infty$ and $-\infty$ in modern floating-point systems.
Therefore $(1/0)$ and $(-1/0)$ are useful as sentinel values and as signed overflow indicators. They fit naturally into the ordering of fractions and permit convenient overflow propagation. On the other hand, they cannot be treated as ordinary fractions, because several basic arithmetic operations involving them are inherently indeterminate. Their greatest value is as special symbols that extend the representation system, not as elements of a fully consistent arithmetic field.