Section 6.1 says the spacing of the 32-bit format grows with the number, and section 6.2 says the relative error of a difference is one rounding times the cancellation ratio. Neither section proves the other half of that sentence.
Derive the spacing of the 32-bit format inside the binade . Show that the relative spacing there lies between and . Use the result to bound the relative error of a difference by times the cancellation ratio. Evaluate the spacing at and at , and give the bound for a difference of 1 at .
This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.
Worked solution
The spacing. Every 32-bit float in the binade has the form The integer is the 24-bit significand, and the hidden bit is the leading one. Neighbouring values differ by one unit of , so the gap is The relative gap is that number divided by the value, and the value lies between and , so The bound is attained at the bottom of the binade and halves at the top, which is why the unit roundoff is quoted as : it is the worst relative error one rounding can cause anywhere in the format.
The two evaluations. At the binade has , so the spacing is . At the binade is , so and the spacing is Eight is the gap between neighbouring numbers near one hundred million, and section 6.2 quotes the same value.
The cancellation bound. Take two operands and in the same binade , each the result of earlier arithmetic, so each carries an absolute error of at most half a step, . Write . The subtraction itself is exact, and the errors add, so the difference carries an absolute error of at most Its relative error is therefore at most If the two operands sit in different binades, the larger one's exponent bounds both errors, and the same line holds with its . At a difference of 1 has cancellation ratio about , and the bound is Using the binade's own base instead gives exactly , which is the spacing itself. The larger is half again the smaller, and both have the right size. The two sections are one statement: the spacing of section 6.1 is the absolute error, and the ratio of section 6.2 converts it into a relative one. The bound is a worst case for two operands; it does not cover a long sum, where the number of additions enters and the errors can partly cancel.