A programmer computes 1.0 + 1e-20 in double-precision floating point. What result does the computer return?
A1.00000000000000000001 — the addition is stored exactly
B1.0 — the added value is smaller than machine epsilon and is lost to rounding
CA runtime overflow error — the result exceeds representable range
DAn indeterminate value — floating-point addition is non-deterministic
Machine epsilon (~2.22×10⁻¹⁶ for double precision) is the smallest ε such that 1+ε ≠ 1. Because 1e-20 is far smaller than ε, the floating-point representation of 1+1e-20 rounds back to exactly 1.0 — the tiny value is absorbed into the rounding of the significand. This is precisely what the definition of machine epsilon captures.
Question 2 Multiple Choice
Double-precision machine epsilon is approximately 2.22×10⁻¹⁶. A stored number x has true value 10¹². What is the worst-case absolute rounding error when x is stored?
AAbout 2.22×10⁻¹⁶ — machine epsilon is the absolute error bound
BAbout 1.11×10⁻⁴ — the relative error bound ε/2 applied to the magnitude of x
CZero — large numbers are stored exactly in floating point
DUnbounded — machine epsilon only applies near the value 1
Machine epsilon is a RELATIVE error bound, not absolute. The unit roundoff u = ε_mach/2 ≈ 1.11×10⁻¹⁶ means |fl(x) − x|/|x| ≤ u, so the absolute error for x ≈ 10¹² is at most u × 10¹² ≈ 1.11×10⁻⁴. A number like 10¹² is accurate to about 15 significant digits but the absolute error is much larger than ε_mach itself. Option A is the classic confusion: treating the relative bound as an absolute one.
Question 3 True / False
Machine epsilon tells us that any real number stored in floating point differs from its true value by at most ε_mach in absolute terms.
TTrue
FFalse
Answer: False
Machine epsilon is a RELATIVE error bound, not an absolute one. The guarantee is |fl(x) − x|/|x| ≤ ε_mach/2 — the error is proportional to the magnitude of x. For a very large number like 10¹⁵, the absolute rounding error can be on the order of 10⁻¹ (a tenth!), far larger than ε_mach ≈ 2.22×10⁻¹⁶. Confusing relative and absolute bounds leads to badly wrong estimates of numerical error.
Question 4 True / False
In IEEE 754 double precision, the gap between 1.0 and the next representable floating-point number equals machine epsilon.
TTrue
FFalse
Answer: True
This is the operational definition of machine epsilon: it is the spacing between 1.0 and the next representable double, which equals 2⁻⁵² ≈ 2.22×10⁻¹⁶. The significance of defining ε_mach near 1 (rather than near some other number) is that spacing between consecutive floating-point numbers scales with the magnitude of those numbers — near 1, the spacing equals ε_mach; near 2, the spacing is 2ε_mach; near 0.5, the spacing is ε_mach/2.
Question 5 Short Answer
Why is machine epsilon described as a relative error bound rather than an absolute one, and why does this distinction matter for numerical computations involving very large or very small numbers?
Think about your answer, then reveal below.
Model answer: Machine epsilon bounds the error as a fraction of the number's magnitude: |fl(x) − x|/|x| ≤ ε_mach/2. This means large numbers incur large absolute errors (though still tiny relative to their size), while small numbers incur tiny absolute errors. The distinction matters because: for x ≈ 10¹², the absolute error can be ~10⁻⁴, which is large in many applications; for x ≈ 10⁻¹², the absolute error is ~10⁻²⁸, negligible. Algorithms that subtract two nearly equal large numbers can suffer catastrophic cancellation — the relative error of the difference explodes even though each operand was stored accurately.
The relative nature of floating-point error is not just a technical detail — it fundamentally shapes which algorithms are trustworthy. Subtraction of nearly equal numbers (catastrophic cancellation) is dangerous precisely because the relative error on the individual numbers is fine but the relative error on their small difference is enormous. Understanding that ε_mach is a relative bound is the foundation for diagnosing numerical instability.