You might be interested in this graphing calculator I made using interval arithmetic: 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
Show HN: I made a calculator that works over disjoint sets of intervals
51–60 of 61 posts
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#52Re: Show HN: I made a calculator that works over disjoint sets of intervals
#53For example a +- b would be [a - b, a + b]
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#54This is based Raku’s built-in Junction and Range classes and was an interesting experiment.
Re: Show HN: I made a calculator that works over disjoint sets of intervals
#55Excellent!! I love interval arithmetic and also wrote a TS implementation for a graphing calculator project. Agree that it's very underrated, and I wish that directed rounding was exposed in more languages.
Yeah it's super interesting. Like you said, I learned that the IEEE 754 spec actually requires that complete implementations of floating point numbers expose a way to programmatically choose the rounding mode. As far as I know only C allows you to do that, and even then it depends on hardware support. For JS I had to use ugly typedarray casts. Which kinda only accidentally work due to endianess. But technically there…