# How many bits of difference in a relative error?

I would like to know if there is a formula or any other way to find out how many bits of difference between two values given the relative error. For instance:

$$\epsilon_{\text{rel}} = \frac{V - V_\text{approx}}{V}$$

so, my relative error for instance could be calculated:

$$\epsilon_{\text{rel}} = \frac{10936907150.600960- 10936907150.600958}{10936907150.600960} = 1.82\times 10^{-16}$$

How can I know how many bits of difference I have here?

That depends on the number of bits in the floating numbers. If you are using 53-Bit IEEE-Double arithmetic, a relative error of $1.82\times 10^{-16}$ means that the error is 1 or 2 bits.
• That depends slightly on the rounding, I just calulated the Hex values with babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html and got 1 bit difference. 10936907150.600960 = 42045F1FAC74CEC4 vs. 10936907150.600958 = 42045F1FAC74CEC3. The machine epsilon for double is $\epsilon = 2.2204460492503131\times 10^{-16}$, some people $\epsilon/2$ as the unit for the round-off error. – gammatester Apr 4 '14 at 11:00