Fixed the secant-method root-finder, also added an introspective check to solve the pathological case by bisection.