Computer Arithmetic
What is the machine epsilon (the gap between 1 and the next larger representable number) in IEEE 754 single precision?
- A2⁻²³ (about 1.19 × 10⁻⁷)
- B2⁻⁸ (about 3.9 × 10⁻³)
- C2⁻⁵² (about 2.2 × 10⁻¹⁶)
Show answer and explanation
Answer: A. 2⁻²³ (about 1.19 × 10⁻⁷)
1.0 is represented as 1.000…0 × 2⁰ with a 23-bit significand, so incrementing the last significand bit gives 1 + 2⁻²³. That gap, 2⁻²³ ≈ 1.19 × 10⁻⁷, is machine epsilon, indicating single precision's relative precision of about seven digits. 2⁻⁵² is the machine epsilon of double precision with its 52-bit significand. 2⁻⁸ confuses it with the exponent width. The value also guides tolerances for comparing floating-point numbers.
- A. Correct. With a 23-bit significand it is 2⁻²³.
- B. 2⁻⁸ confuses it with the 8-bit exponent.
- C. 2⁻⁵² is double precision's machine epsilon.