1.10: Machine Epsilon
Machine epsilon \(\left(\epsilon_{\mathrm{mach}}\right)\) is the distance between 1 and the next largest number. If \(0 \leq \delta<\epsilon_{\mathrm{mach}} / 2\) , then \(1+\delta=1\) in computer math. Also since
\[x+y=x(1+y / x) \nonumber \]
if \(0 \leq y / x<\epsilon_{\operatorname{mach}} / 2\) , then \(x+y=x\) in computer math.
Find \(\epsilon_{\text {mach }}\)
The number 1 in the IEEE format is written as
\[1=2^{0} \times 1.000 \ldots 0, \nonumber \]
with \(230^{\prime}\) s following the binary point. The number just larger than 1 has a 1 in the 23 rd position after the decimal point. Therefore,
\[\epsilon_{\text {mach }}=2^{-23} \approx 1.192 \times 10^{-7} \nonumber \]
What is the distance between 1 and the number just smaller than 1? Here, the number just smaller than one can be written as
\[2^{-1} \times 1.111 \ldots 1=2^{-1}\left(1+\left(1-2^{-23}\right)\right)=1-2^{-24} \nonumber \]
Therefore, this distance is \(2^{-24}=\epsilon_{\operatorname{mach}} / 2\) .
The spacing between numbers is uniform between powers of 2, with logarithmic spacing of the powers of 2 . That is, the spacing of numbers between 1 and 2 is \(2^{-23}\) , between 2 and 4 is \(2^{-22}\) , between 4 and 8 is \(2^{-21}\) , etc. This spacing changes for denormal numbers, where the spacing is uniform all the way down to zero.
Find the machine number just greater than 5
A rough estimate would be \(5\left(1+\epsilon_{\text {mach }}\right)=5+5 \epsilon_{\text {mach }}\) , but this is not exact. The exact answer can be found by writing
\[5=2^{2}\left(1+\frac{1}{4}\right) \nonumber \]
so that the next largest number is
\[2^{2}\left(1+\frac{1}{4}+2^{-23}\right)=5+2^{-21}=5+4 \epsilon_{\text {mach }} \nonumber \]