Victor Poughon released an open-source interval calculator that implements disjoint union arithmetic, solving a longstanding limitation in standard interval arithmetic. The TypeScript-based tool, shared on Hacker News on April 18, 2026, received 222 points and demonstrates robust handling of operations like division by intervals containing zero.
Standard Interval Arithmetic Fails on Division by Zero-Containing Intervals
Standard interval arithmetic has poor handling of division by intervals containing zero. When computing 1 / [-1, 2] in regular interval arithmetic, the result is either [-∞, +∞] or the operation is deemed undefined. Both solutions are virtually useless. The mathematically correct answer is [-∞, -1] ∪ [0.5, +∞]—a union of two disjoint intervals.
This limitation extends to any non-continuous function. For example, the tangent function tan() exhibits similar behavior, which Poughon's project implements. The core problem is that accurate results from these operations are not single intervals, creating challenges for building closed arithmetic systems where arbitrary expressions can be evaluated over interval values.
Implementation Based on 2017 Research Paper
The solution implements arithmetic over disjoint unions of intervals, based on a 2017 paper titled "Interval Unions" by Schichl, Domes, Montanher, and Kofler. Poughon's open-source project provides an interactive calculator built in TypeScript that demonstrates interval union arithmetic in practice.
The underlying TypeScript library is dependency-free and implements interval union arithmetic over IEEE 754 double precision floats (JavaScript's native number type) with outward rounding. This guarantees accuracy of interval results even in the presence of rounding issues inherent to floating-point arithmetic.
Developer Highlights Gap Between Research and Recognition
Poughon explained his motivation for the project: "I've been studying interval arithmetic for the past few weeks and it's a really interesting field because while there is a ton of super interesting research published over the past decades, it has never really gotten the recognition that it deserves, IMO."
The benefit of interval union arithmetic is the ability to confidently exclude non-empty sets of real numbers from possible values. When dividing 1 by a number between -1 and 2, users can exclude the interval [-1, 0.5] from the set of possible results, providing more precise information than standard interval arithmetic.
Community Response and Accessibility
The project received strong community interest, garnering 222 points and 44 comments on Hacker News. The interactive calculator is available at https://victorpoughon.github.io/interval-calculator/, allowing users to experiment with interval union arithmetic directly in their browsers.
The implementation addresses a practical need for robust numerical computation while making advanced mathematical concepts accessible through an intuitive interface.
Key Takeaways
- Standard interval arithmetic produces useless results ([-∞, +∞] or undefined) for division by intervals containing zero
- Disjoint interval unions provide mathematically correct results like [-∞, -1] ∪ [0.5, +∞] for operations like 1 / [-1, 2]
- The open-source TypeScript implementation uses IEEE 754 outward rounding to guarantee accuracy despite floating-point limitations
- The project is based on 2017 research that has not achieved widespread recognition despite its utility
- The interactive calculator received 222 points on Hacker News, indicating strong community interest in practical mathematical tools