I would simply use a large precision C++ library to get the overloaded operators. Criminy, this was a programming exercise in a FORTRAN class more than 20 years ago.

Here:

[link|http://www.mathtools.net/C++/Libraries/|http://www.mathtools.net/C++/Libraries/]