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
- Compare scientific notation: 1.23 x 10^0 and 1.23 x 10^6. What is the gap to the next value in each?
- 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.
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
- Sort each way of comparing two floating-point values.
- In 1996 the Ariane 5 rocket destroyed itself 37 seconds after launch, from converting a 64-bit float to a…
- In that same toy system, representable values are spaced 0.25 apart. What is the largest possible round-off…
- Select every statement about floating-point arithmetic that is TRUE.