added an exception when f(x0)*f(x1) > 0