Error and Representation
Machine Epsilon by Halving
Machine epsilon is the smallest floating-point value eps such that 1+eps > 1 in the machine's arithmetic. Starting from eps=2^-49 and halving repeatedly, the test 1+eps=1.0 first becomes true at eps=2^-53, confirming machine epsilon is 2^-52 (approximately 2.220e-16) for IEEE 754 double.
machine-epsilon-halving
IEEE 754 double precision stores 52 mantissa bits. The smallest difference between 1.0 and the next representable number is 2^-52 ≈ 2.22e-16 (machine epsilon). Halve eps until 1+eps rounds to 1 in floating-point; the last eps where 1+eps > 1 equals machine epsilon.