The following page illustrates graphically the bisection method. As this example shows, a bounding point may lie closer to the root than the midpoint during any particular iteration. However, the bisection method is guaranteed to converge to the proper solution, provided that the initial interval contains a root and provided that we are dealing with a function that crosses the x-axis at the root (compare the following example versus this other one).
An algorithm for the bisection method is given below.
Calculate XMID=(XSTART+XSTOP)/2.