C++ simple algebra library