Sterbenz’s Lemma:
If your floating point system has denormals, and if x,y are non-negative, finite floating point numbers such that y/2≤x≤2y, then x−y is a floating point number.
Proof:
We can assume y≤x≤2y. Let Mx,ex be the significand and exponent of x, and define similar variables for y. Now we can easily show that ey≤ex. Now let δ=ex−ey. Then:
Now we know that M≥0 because x≥y.
We know that M is an integer.
From x≤2y we know that x−y≤y. Thus Mβey−p+1≤Myβey−p+1. This gives M≤My≤βp−1. The proof is complete.
We need denormals because x−y could be a denormal.
Another theorem: If x and y are floating point numbers, and if \RN(x+y) is subnormal, then \RN(x+y)=x+y.
Proof: All floating point numbers are integral multiples of α. Thus so is x+y. If it is a subnormal number, then it is less than βemin. Thus it is exactly representable. All multiples of \alpha that are subnormal are exactly representable!