Methods on numerical analysis in C++