DE version is available. Content is displayed in original English for accuracy.
One reason for this is that standard interval arithmetic has really poor handling of division by intervals containing zero. If you compute 1 / [-1, 2] in regular interval arithmetic, you get either [-ā, +ā], or you have to say that the operation is undefined. Both solutions are virtually useless. The real answer of course is [-ā, -1] U [0.5, +ā]: i.e. a union of two disjoint intervals.
This is useful because you can confidently exclude a non empty set of the real numbers ([-1, 0.5]) from the set of possible values that you can get by dividing 1 by a number between -1 and 2.
But this definition of interval division yields a value that is not an interval. This is a problem if you want to define a closed arithmetic system, where you can build and evaluate arbitrary expression over interval values.
(This behavior extends to any non continuous function like tan() for example, which is implemented in my project - not without difficulties!)
Well the obvious solution is to define your arithmetic over disjoint unions of intervals. This is the subject of a 2017 paper called "Interval Unions" by by Schichl, H., Domes, F., Montanher, T. and Kofler, K..
This open-source project I made implements interval union arithmetic in TypeScript in the form of a simple interactive calculator, so you can try it out for yourself! The underlying TypeScript library is dependency free and implements interval union arithmetic over IEEE 754 double precision floats (JS native number type) with outward rounding. This guarantees accuracy of interval results in the presence of rounding issue inherent to floating point.

Discussion (18 Comments)Read Original on HackerNews
I made interval calculator actually mostly as a way to test my implementation of interval union arithmetic [0], which I needed for another project: a backwards updating spreadsheet [1][2].
[0] https://github.com/victorpoughon/not-so-float
[1] https://victorpoughon.github.io/bidicalc/
[2] https://news.ycombinator.com/item?id=46234734
https://youtu.be/UxGxsGnbyJ4?si=Oo6Lmc4ACaSr5Dk6&t=1006
https://memalign.github.io/m/formulagraph/index.html
Some detail on how this works, including links to the relevant interval math code:
https://memalign.github.io/p/formulagraph.html
Applied to the cases here:
]-ā, -1] U [0.5, +ā[
The excluded interval in between becomes ]-1, 0.5[ then.
Thatās how min (and analogously max) works, right? min(A, B) = [lo(A,B), lo (hi(A), hi(B))].
Edit: idea: copy a formula from the results section to the input field if the user clicks/taps on it.
[0]: https://www.ime.usp.br/~montanhe/unions.pdf
See, this is why Bourbaki introduced the ]0,1[ notation.
The interval abstract domain works under interval analysis with an algebra thatās the same of this calculator. Itās funny to implement something like that on source/binary level :)
Though you are inherently losing precision: there are values in the output interval which don't have a corresponding input that causes this output.
There's other unused stuff in IEEE 754 like that: the inexact bit or signaling NaNs!
Disjoint unions of intervals seems like a nice thing to have