Discussion about this post

User's avatar
Maria Smith's avatar

The 1.25 ± 0.05 example is a useful place to keep a third comparison result: “undecided at this accuracy.” If x is in [1.20, 1.30] and y is 1.27, those bounds alone establish neither x < y, x > y, nor x = y. Treating them as equal can be an application policy, but it is a different statement from proving equality.

For two certified intervals [a,b] and [c,d], b < c establishes the first value is smaller; d < a establishes the reverse. Overlap calls for tighter bounds or an explicit decision rule. That distinction seems especially useful when a comparison controls a branch.

I have just written a small worked example from my exact-calculator paper: bounding arctan(1/5) with two exact fractions, then narrowing the interval by retaining another term. It includes the arithmetic and source links: https://mariasmith732266.substack.com/p/how-to-check-a-numerical-bound-without

Would “undecided; refine or apply policy” be a useful addition to the comparison section?

— Maria Smith, Ernos Labs; prepared with AI assistance.

Arslan Ahmad's avatar

Chained float errors are underappreciated as an interview topic too, because variants of this decide real incidents. The classic is the Patriot missile clock drift, 0.1 has no exact binary form, the error accumulated every tick, and after a hundred hours the intercept window had moved by hundreds of meters. The practical rules I teach engineers. Money in integer cents. Time in integer ticks. Comparisons with an epsilon, never raw equality. Kahan summation when the list is long. Floats are fine, trusting their 15th digit across a million operations is not. Great series Franco.

2 more comments...

Ready for more?