Show HN: I made a calculator that works over disjoint sets of intervals
21–30 of 61 posts
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#22I wish in classes we were introduced to a notion of arithmetic on intervals as it comes up. Like in basic statistics with confidence intervals there's ±, as well as in the quadratic equation. It found some what dissatisfying we couldn't chain the resulting a series of operations and instead repeat the operations for the 2 seperate values of the ±. I get a teacher would rather not get hung up on this because they want to bring it back to the application generally, like solving a more complicated equation or hypothesis testing in basic stats. I just wish they hinted at the idea we can do arithmetic on these kinds of things more generally.
I realise what you've got here is well beyond this, but seeing this was some level of validation that treating the interval as a piece of data with its own behaviour of certain operations does make some sense.
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#23[flagged]
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#24Re: Show HN: I made a calculator that works over disjoint sets of intervals
#25Author here. Outward rounding to combat precision issues is what interval arithmetic is most known for (try 0.1+0.2 with "full precision mode" enabled), but that's really a shame in my opinion. Outward rounding is cool, but the "inclusion property", as it's known in research papers, works at every scale! This is what enables things like: 50 * (10 + [-1, 1]) [450, 550] which is lovely, I think. Adding the union layer…
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#26I just read up on interval arithmetic. I understand its desirable properties. Where in practice have you applied it? What’s a real world application for interval arithmetic?
In physics, whenever you make a measurement it has a precision. Usually you represent this as a normal distribution, but for calculations it can be easier to represent this as an interval. The police measure the distance my car travelled [ 99.9, 100.1 ] m and the time it took [ 3.3, 3.4 ] s - how fast was my car going? [29.38, 30.33] m/s according to the interval calculator. Physics students learn exactly this method…
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#27I just read up on interval arithmetic. I understand its desirable properties. Where in practice have you applied it? What’s a real world application for interval arithmetic?
It can be used in static analysis or type checking. E.g. if (x >= 0) { x += 10 if (x = By maintaining an interval of possible values of x, you can detect the unreachable branch, because the interval becomes empty: initial: [-oo, oo] x >= 0 : [0, oo] x += 10: [10, oo] x =
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#28Re: Show HN: I made a calculator that works over disjoint sets of intervals
#29Author here. Outward rounding to combat precision issues is what interval arithmetic is most known for (try 0.1+0.2 with "full precision mode" enabled), but that's really a shame in my opinion. Outward rounding is cool, but the "inclusion property", as it's known in research papers, works at every scale! This is what enables things like: 50 * (10 + [-1, 1]) [450, 550] which is lovely, I think. Adding the union layer…
Nice! I am interested in how the arithmetic you implemented differs from the IEEE 1788 Standard for Interval Arithmetic (and how the two linked papers relate to it). To address the challenges you mention, did you have to start from scratch or was it something that can build on top of the IEEE standard?
[0] https://github.com/victorpoughon/not-so-float/blob/main/src/...
[1] https://fab.cba.mit.edu/classes/S62.12/docs/Hickey_interval....
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#30I just read up on interval arithmetic. I understand its desirable properties. Where in practice have you applied it? What’s a real world application for interval arithmetic?
It can be used in static analysis or type checking. E.g. if (x >= 0) { x += 10 if (x = By maintaining an interval of possible values of x, you can detect the unreachable branch, because the interval becomes empty: initial: [-oo, oo] x >= 0 : [0, oo] x += 10: [10, oo] x =