Mathematics I / Floating-Point Numbers
Practice question · Numerical answer

In that same toy system, representable values are spaced 0.25 apart. What is the largest possible round-off error when a real number in that range is stored?

Hints
  1. The worst case is a real number sitting as far as possible from both neighbours.
  2. That happens exactly halfway between two representable values.
Show the answer

0.125 (answers within ±0.001 count)

Why

A value midway between two ticks is 0.125 from each, so the worst-case error is half the spacing. This is why round-off error is described as half the gap between neighbouring floats, and why it grows with the magnitude of the number.

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