bisection method for finding the root of the equation f(x0)=0 is based on the repeated applications code example
Example: bisection method
based on IVT, c=(a+b)/2, if(fa*fc<0) b=c else a=c
based on IVT, c=(a+b)/2, if(fa*fc<0) b=c else a=c