Algorithm For Newton Raphson Method