This will find a root of a given function in a given interval.
Pass the function start and end points for the search, the function and tell it how accurate you want the result (in the form 2^-n). It will then bisect and find!
This has the usual caveats of interval bisection methods (especially short ones lacking error checking...): if you pick an interval without roots, it can't find any! (hence why it returns the root together with the error :) ); if you pick a particularly pathological function, the error may be significant (think tanh(l*x) for l >> 1); if you pick an interval with multiple roots, you will get at most one, perhaps none of the roots.