My university teacher gave us a project. He wants us to create a program which will execute a modified bisection method for a function but not by diving everytime the range by $2$, but by dividing it with a random number. The process stops when $6$ digits precision occurs. My problem is with finding the correct condition for stopping finding roots.
*In classic Bisection when it gives us accuracy (for example, $6$) there's a formula for iterations that says:
Given a function $f$ defined on $(a,b)$,
$N> \frac{ \ln(b-a)-\ln k }{\ln2}$ with
$N$: number of iterations
$k: \frac12 \times 10^{-n}$ with $n$ being the wanted accuracy ($6$ in this example).