AI Briefing
KO

A calculator that computes over disjoint interval sets

·2026.04.19 10:01

Key point

Introducing a browser-based interval calculator that handles unions of disjoint intervals.

Details

This is an interval union arithmetic calculator that takes unions of disjoint intervals as input and performs arithmetic operations, exponentiation, and function calls.

The computed result is guaranteed to always include the actual computed value for every real-number combination chosen from the input, and it also handles division by an interval containing 0 by producing a disjoint union.

For example, 1 / [-2, 1] becomes [-∞, -0.5] U [1, +∞], and tan([pi/3, 2*pi/3]) becomes [-∞, -1.732] U [1.732, +∞], illustrating how discontinuous ranges and infinite bounds are represented.

The supported syntax and features are as follows.

  • Interval notation: [a, b], [a, b] U [c, d]
  • Nested interval syntax
  • Arithmetic operations, ^
  • Functions: abs, sqrt, sqinv, log, log2, log10, exp, cos, sin, tan, acos, asin, atan, min, max
  • Constants: inf, ∞, pi, e
  • Bound extraction: lo(A), hi(A)
  • Hull computation: hull(A)

In full precision mode, it applies outward rounding for IEEE 754 double-precision floating point, returning an interval that encloses the actual value. For instance, 0.1 + 0.2 is shown as [0.29999999999999993, 0.3000000000000001].

In the default mode, input numbers are interpreted as degenerate intervals, and output is displayed with up to 4 decimal places. In full precision mode, input numbers are interpreted as the smallest enclosing interval, and output is displayed using the Number.toString() method.

The current implementation may still have bugs, and a GitHub issue link for reporting problems as well as a sponsorship link are provided. The calculator engine not-so-float and Interval Calculator are both open source.

Planned future work includes separating full precision mode into input interpretation and display precision, adding an ans variable, an intersection operator or function, improving U operator precedence, and supporting empty union input.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.