The idea is: instead of storing digits of a number, we store a lower and upper bound, and a function to refine and add more accuracy to the number. With this, we can compute anything on-demand to arbitrary precision.
-
-
Show this thread
-
Where this becomes clever is compositionality: the library exposes functions that take constructive reals as input and refine their output on demand. With this, we can do almost anything! BUT...
Show this thread -
Some seemingly trivial tests like sqrt(2)*sqrt(2)==2 may loop infinitely because they refine a lower and upper bound that approach 2 on both sides without ever reaching it. So it's not a completely usable construct.
Show this thread -
In a grand scheme of programming language design, I'd love to have a subtype hierarchy with int64 (64-bit integers) <= int (arbitrary precision integers) <= rational (arbitrary precision rational numbers) <= real (constructive reals).
Show this thread
End of conversation
New conversation -
-
-
There’s an interesting implementation of these ideas in C++ using templates to try to make things efficient:https://github.com/blambov/RealLib
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If you have an Android phone, take a closer look at your calculator!https://twitter.com/HigherGeometer/status/1216518303440457728 …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
happy lunar new year! tim! and happy 911
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.