Computer Arithmetic

Which correctly describes the spacing between adjacent representable floating-point values?

  1. AThe larger the magnitude, the wider the gap to the neighboring value
  2. BThe gap to the neighboring value is the same at every magnitude
  3. CThe larger the magnitude, the narrower the gap to the neighboring value
Show answer and explanation

Answer: A. The larger the magnitude, the wider the gap to the neighboring value

Floating point has a fixed number of significand digits and scales by the exponent, so values are evenly spaced within one exponent range, and the spacing doubles each time the exponent increases by one. In single precision, the gap near 1 is about 1.2 × 10⁻⁷ but near 100 million it is 8. Relative precision is thus about the same at all magnitudes, while absolute error grows with size. Uniform spacing everywhere is a property of fixed point.

  • A. Correct. The larger the exponent, the wider the spacing.
  • B. Uniform spacing everywhere describes fixed point.
  • C. Spacing widens, not narrows, as magnitude grows.
Practice this topic Back to topic

More Computer Arithmetic questions

  1. Up to what value can IEEE 754 single precision represent every integer exactly, starting from 0?
  2. Why are monetary amounts often handled as integers in the smallest unit (one yen or one cent) rather than as binary floating point?
  3. In mixed-precision AI training, why are master weights kept in FP32 while most computation is done in FP16 or bfloat16?
  4. In unsigned fixed point with the low 4 of 8 bits as the fraction, what value does the bit pattern 0011 1000 represent?
  5. Which three parts make up an IEEE 754 floating-point number?