NewtonRaphson and Secant methods class