bisection/newtonraphson complete