This algorithm of dichotomy is the simplest but also generically
It encloses the zero of a function on an interval.
Each iteration, cuts the interval into two parts. We compute the middle point
value. The function sign at this point, gives us the half-interval
on which the next iteration will be performed.