Hacker News new | ask | show | jobs
by squeaky-clean 3076 days ago
I've definitely owned a Casio calculator that worked on fractions rather than decimals and could even work in terms of roots and certain irrational numbers like e and pi.

For example, sqrt(2) + sqrt(8) would print 3 sqrt(2) rather than 4.242640687119286~

I wish I knew how it worked, it's probably something simple like suggested in another comment.

1 comments

Look at any computer algebra system, for exaple sympy (https://sympy.org) and see how they implement it (it's open source).