Mathematics I / Floating-Point Numbers
Practice question · Multiple choice

Floating-point numbers are spaced evenly in a toy system like 1.0, 1.25, 1.5, 1.75, 2.0 - but across the full range they are not evenly spaced at all. Why does the gap between representable numbers grow with magnitude?

Hints
  1. Compare scientific notation: 1.23 x 10^0 and 1.23 x 10^6. What is the gap to the next value in each?
  2. Ask whether the precision is a fixed number of digits or a fixed absolute size.
Show the answer

C. Because the mantissa's fixed precision is a relative precision.

Why

Floating point is scientific notation in binary, fixed significant digits times a power of two, so a fixed relative precision means the absolute gap scales with size. Near 1 the gap is about 2×10⁻¹⁶; near 10¹⁶ it exceeds 1, and adding 1 changes nothing. Which is why summing an array smallest-first is more accurate, and why Kahan summation exists.

Read the lesson: Floating-Point Numbers →

Practise Floating-Point Numbers

The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.

More questions on Floating-Point Numbers