‘dc’ has been a thing on Unix forever. It uses RPN, provides arbitrary precision arithmetic, and is programmable.
https://en.wikipedia.org/wiki/Dc_%28computer_program%29