My eyes glazed over towards the end of this post on the complexity of writing a calculator app. But it’s really fascinating. Hans-J. Boehm and his team developed an innovative approach using a combination of rational arithmetic and recursive real arithmetic to handle both exact and irrational numbers efficiently.
To give correct answers to mathematical expressions, a calculator must represent numbers. And almost all numbers cannot be expressed in IEEE floating points.