bisection_roots and sample