Introduction

Every number stored in a computer is slightly wrong. The fraction 1/3 can't be written exactly in binary; the decimal 0.1 can't either. When you chain hundreds of operations together — the way scientific simulations do — those tiny mismatches accumulate, and there is no easy way to know how large the final error actually is.

Interval arithmetic attacks that problem head-on. Instead of representing a quantity as a single floating-point value, it carries a guaranteed bracket [a, b] that is guaranteed to contain the true mathematical answer. Every addition, subtraction, multiplication, and division is redefined so that the bracket expands just enough to swallow the rounding error of that step.

The result is a computation that proves its own accuracy: if you evaluate a formula with interval arithmetic and get [3.14159, 3.14160], you know with certainty — no approximation, no probability — that the true value lies in that range.

The idea was formalized by Ramon E. Moore in his 1966 book Interval Analysis, making it one of the foundational techniques of rigorous numerical computing. It sits in the toolkit of everyone who needs not just a good answer, but a guaranteed one.

Try It: Certified Error Brackets

The demo below evaluates a function step by step using interval arithmetic. At each operation the bracket [lo, hi] widens to absorb the rounding error. The true result is always inside.

<p class="hint">{{hint}}</p>
<div class="controls">
  <label>{{label_fn}}
    <select id="fn-select">
      <option value="poly">{{opt_poly}}</option>
      <option value="trig">{{opt_trig}}</option>
      <option value="chain">{{opt_chain}}</option>
      <option value="recip">{{opt_recip}}</option>
    </select>
  </label>
  <label>x = <span id="x-val">0.00</span>
    <input type="range" id="x-slider" min="-3" max="3" step="0.05" value="0">
  </label>
</div>
<div class="steps" id="steps"></div>
<div class="bar-row">
  <div class="bar-label">{{bar_true}}</div>
  <div class="bar-wrap"><div class="bar true-bar" id="true-bar"></div><span class="bar-val" id="true-val"></span></div>
</div>
<div class="bar-row">
  <div class="bar-label">{{bar_iv}}</div>
  <div class="bar-wrap"><div class="bar iv-bar" id="iv-bar"></div><span class="bar-val" id="iv-val"></span></div>
</div>
<div class="width-row">{{width_label}} <strong id="iv-width">—</strong> &nbsp;{{width_suffix}}</div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; font-size: .93rem; }
.hint { font-size: .88rem; color: #444; margin: 0 0 .8rem; line-height: 1.5; }
.controls { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; }
label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
select { font-size: .9rem; padding: .25rem .4rem; border-radius: 6px; border: 1px solid #bbb; }
input[type=range] { flex: 1; accent-color: #1d3557; }
.steps { background: #f4f7fa; border-radius: 8px; padding: .6rem .9rem; margin-bottom: .9rem;
         font-size: .85rem; line-height: 1.7; font-family: ui-monospace, monospace; }
.step-line { display: flex; gap: .6rem; }
.step-op { color: #457b9d; min-width: 14ch; }
.step-iv { color: #1d3557; font-weight: 600; }
.step-note { color: #666; font-size: .82rem; }
.bar-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.bar-label { min-width: 11ch; font-size: .82rem; color: #555; }
.bar-wrap { flex: 1; height: 22px; background: #e2e8f0; border-radius: 6px; position: relative; overflow: visible; }
.bar { position: absolute; height: 100%; border-radius: 6px; }
.true-bar { background: #1d3557; }
.iv-bar { background: #a8dadc; border: 2px solid #457b9d; }
.bar-val { position: absolute; right: -4px; top: 50%; transform: translate(100%, -50%);
           font-size: .78rem; font-family: ui-monospace, monospace; white-space: nowrap; color: #333; padding-left: .4rem; }
.width-row { font-size: .86rem; color: #333; margin-top: .4rem; }
strong { color: #c92f3c; }
// Code not found

Notice how the bracket grows as you chain more operations, but also how it tightens when the function is evaluated at a point where the range is narrow. The key insight: no matter how many steps you take, you always have a certificate — if your final interval is [3.99, 4.01], the true answer is definitely between 3.99 and 4.01.

This is fundamentally different from estimating a floating-point rounding error after the fact. The bracket is computed alongside the answer, at every step, in real time.

The Wrapping Effect

Interval arithmetic sounds like a free lunch, but it has two well-understood costs.

The dependency problem. If a variable appears more than once in a formula, interval arithmetic treats each occurrence as an independent unknown. For example, evaluating xx for x ∈ [1, 3] returns [1−3, 3−1] = [−2, 2] instead of the correct answer 0. The two copies of x could independently range over [1, 3], so the interval widens unnecessarily.

The wrapping effect. After several operations, the true set of reachable values may be a small, tilted ellipse in the plane, but intervals can only represent axis-aligned boxes. Wrapping an ellipse in a box adds corners that don't belong, growing the bracket with each iteration.

Both problems mean that interval results can be wider than necessary — a phenomenon called overestimation. The true answer is still always inside; you just can't always tighten the box as much as you'd like.

How practitioners fight back:

  • Centered forms rewrite the formula to minimize how often a variable appears.
  • Taylor models combine intervals with polynomial approximations for tighter enclosures.
  • Constraint propagation (used in tools like ICOS and Ibex) narrows intervals by applying each equation as a filter in both directions.
  • Splitting: if a bracket is too wide, subdivide the input range and evaluate each piece separately — a technique called branch-and-bound that is provably correct and widely used in global optimization.

The bottom line: interval arithmetic gives you guaranteed containment, not minimum-width containment. That guarantee is the point — see floating-point arithmetic for what happens when you trust a single number without one.

Where It Matters

Anywhere that "probably correct" isn't good enough, interval arithmetic shows up:

  • Computer-assisted proofs. Thomas Hales used interval arithmetic (plus linear programming) to prove the Kepler conjecture in 1998 — that the face-centered cubic packing is the densest possible arrangement of equal spheres. The proof required millions of verified inequality checks, each with a certified bracket.
  • Global optimization. Tools like the interval-based solver BARON, and the open-source library Ibex, use interval subdivision to find the true global minimum of a function over a box — no local-minimum traps, because every sub-box where the minimum can't live is provably discarded.
  • Spacecraft trajectory design. NASA's Jet Propulsion Laboratory uses validated numerics to certify that a probe's orbit will meet constraints even under worst-case measurement uncertainty.
  • Robotics and control. Guaranteed inner and outer approximations of reachable sets let engineers prove that a robot arm can never collide with an obstacle, regardless of sensor noise.
  • ODE solvers. Packages like VNODE-LP and COSY Infinity integrate differential equations with verified error bounds, used in particle accelerator design and chemical kinetics.
  • Cryptography and security. Side-channel proofs sometimes need exact arithmetic bounds that floating-point cannot supply.

Interval arithmetic is also the foundation of abstract interpretation — the technique that lets static analyzers like Astrée prove that an Airbus flight-control program is free of runtime errors.

Conclusion

Interval arithmetic makes a simple bargain: carry two numbers instead of one, expand the bracket at every step just enough to absorb rounding, and in return get a proof that the true answer lies inside. No statistics, no confidence levels, no caveats — just a guaranteed range.

The cost is real: intervals can overestimate, and the wrapping effect can make them grow faster than ideal. But the techniques to fight overestimation — centered forms, Taylor models, splitting — are mature and well-understood.

The payoff is that some of the most important results in modern mathematics and engineering rest on this foundation. Every time you read that a computer-assisted proof has been verified, or that a spacecraft trajectory is guaranteed to satisfy constraints, there is almost certainly a layer of interval arithmetic underneath.

Next time a calculator shows you 3.14159265, remember: that is a guess. An interval tells you the truth is in [3.141592653589793, 3.141592653589794] — and that is a fact.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/interval-arithmetic/Content licensed under CC BY-NC 4.0.