Mathematics I / Floating-Point Numbers
Practice question · Select all that apply

Select every statement about floating-point arithmetic that is TRUE.

Hints
  1. Between any two floats there are infinitely many reals, how many can be stored?
  2. 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.

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