Add sanity checks to Bisection and Backtracking