Self-study with Brilliant at https://brilliant.org/TreforBazett to get started for free for 30 days, and to get 20% off an annual premium subscription!
Paper by Hans Boehm: https://research.google/pubs/towards-an-api-for-the-real-numbers/
Useful blog post also covering the paper: https://chadnauseam.com/coding/random/calculator-app
The iOS calculator occasionally gives errors like saying that 10^100+1-10^100=0. This is because it uses floating point arithmetic, which is great because it uses little memory, can represent a huge range of numbers, and allows for very efficient calculations. But Hans Boehm at google uses a hybrid approach with recursive real arithmetic to create a calculator app that avoids these errors and, while not perfect, is pretty good at identifying user experience issues like deciding between 0 and 0.00000000.
♡♡♡SUPPORT THE CHANNEL♡♡♡
►Support on PATREON: https://patreon.com/DrTrefor
► CURIOSITY BOX: https://www.CuriosityBox.com/DrTrefor use CODE drtrefor for 25% off awesome STEM merch boxes
► MATH BOOKS I LOVE (affiliate link): https://www.amazon.com/shop/treforbazett
0:00 Apple vs Google
0:38 Floating Point Arithmetic
4:11 Rationals and Dyadic Rational Approximations
7:23 Recursive Reals
9:48 Addition of Recursive Reals
15:05 Decidability
18:00 Implementation
24:53 Check out Brilliant.org/TreforBazett
Correction:
8:42 I say we can UNIQUELY choose a dyadic rational within that error bound that has the denominator 2^n. It isn't quite unique. Take 1/3 rounding to the nearest 1/4. Both 1/4 and 2/4 are within the error range. But that's ok, you can choose either of them and ultimately all we care about is choosing something within the error bound that is as small (from a memory perspective, i.e. smaller denominator) as possible. I can't tell from paper, but I suspect in the implementation it spends a bit of computational time to adjudicate that 1/4 is closer than 2/4 and so chooses that one
COURSE PLAYLISTS:
►DISCRETE MATH: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxersk8fUxiUMSIx0DBqsKZS
►LINEAR ALGEBRA: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxfUl0tcqPNTJsb7R6BqSLo6
►CALCULUS I: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxfT9RMcReZ4WcoVILP4k6-m
►CALCULUS II: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxc4ySKTIW19TLrT91Ik9M4n
►MULTIVARIABLE CALCULUS (Calc III): https://www.youtube.com/playlist?list=PLHXZ9OQGMqxc_CvEy7xBKRQr6I214QJcd
►VECTOR CALCULUS (Calc IV) https://www.youtube.com/playlist?list=PLHXZ9OQGMqxfW0GMqeUE1bLKaYor6kbHa
►DIFFERENTIAL EQUATIONS: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxde-SlgmWlCmNHroIWtujBw
►LAPLACE TRANSFORM: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxcJXnLr08cyNaup4RDsbAl1
►GAME THEORY: https://www.youtube.com/playlist?list=PLHXZ9OQGMqxdzD8KpTHz6_gsw9pPxRFlX
OTHER PLAYLISTS:
►Cool Math Series:
https://www.youtube.com/playlist?list=PLHXZ9OQGMqxelE_9RzwJ-cqfUtaFBpiho
► Learning Math Series
https://www.youtube.com/watch?v=LPH2lqis3D0&list=PLHXZ9OQGMqxfSkRtlL5KPq6JqMNTh_MBw
SOCIALS:
►X/Twitter: http://X.com/treforbazett
►TikTok: http://tiktok.com/@drtrefor
►Instagram (photography based): http://instagram.com/treforphotography