The high precisopion algorithm in C++