# 13.3  Examples

The single-precision algorithm is given by the following sequence of operations. The spacing of the steps is intended to denote groups of operations that may be executed in parallel. Note that the rounding mode is used for all intermediate steps and the input mode is used for the final step.

Definition 13.3.1   (divsp) is the result of the following sequence of computations:

The following properties of the function rcp24 have been verified by exhaustive computation.

Lemma 13.3.1   (rcp24-spec) If is 24-exact, , and , then and

The next lemma, which has been similarly verified, will be used in conjunction with Lemma 13.2.2 in the proof of Theorem 13.1.

Lemma 13.3.2   For , let . If is computed as in Definition 13.3.1, then .

(divsp-correct) Let and be 24-exact with and . If is an IEEE rounding mode and , then

PROOF: According to Lemma 13.1.2, we need only establish the inequalities (ii) and (i) , where is defined as in the lemma.

Let

 and

By Lemma 13.3.1, . By Lemma 13.2.1 (under the substitutions of for both and , for both and , and for ), and . It is easily verified by direct computation that and . The required inequality (ii) then follows from Lemmas 13.2.2 and 13.3.2.

Let . By Lemma 13.1.1,

Since (by direct computation), we may apply Lemma 13.1.3 (substituting , , , and for , , , and , respectively) to conclude that (i) holds as well.

The double-precision algorithm follows:

Definition 13.3.2   (divdp) is the result of the following sequence of computations:

Note that in this case, the initial approximation is based on a truncation of the denominator, which increases its relative error:13.2

PROOF: Let . Then and by Lemma 13.3.3,

The relative error of the final reciprocal approximation must be computed explicitly in 1027 cases:

Lemma 13.3.4   For , let . If is computed as in Definition 13.3.2, then .

(divdp-correct) Let and be 53-exact with and . If is an IEEE rounding mode and , then

PROOF: Applying Lemma 13.1.2 once again, we need only establish the two inequalities (ii)  and (i)  .

Let

 and

Let . Then and by Lemma 13.3.3,

By Lemma 13.3.3, . By repeated applications of Lemma 13.2.1, , , and . It is easily verified by direct computation that and , and (ii) follows from Lemmas 13.2.2 and 13.3.4.

Let . Direct computation yields , and (i) again follows from Lemma 13.1.3

David Russinoff 2017-08-01