Newton Raphson Method Cpp Payment