Practice question · Select all that apply
Select every statement about floating-point arithmetic that is TRUE.
Hints
- Between any two floats there are infinitely many reals, how many can be stored?
- One option treats an inherent limitation as a defect in the code.
Show the answer
- B. Two computations that are mathematically equal can give slightly different stored values
- D. NaN arises from operations such as 0 divided by 0 and contaminates later arithmetic
- E. Whole numbers within the mantissa's range are stored exactly
Why
Only finitely many values are representable, so most reals are rounded, and round-off is therefore inherent rather than a bug. Different routes to the same value round differently, NaN propagates, and modest integers are exact.
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…
- 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…