Why does this function not return anything? : <p>I have the following function written in python 3</p>

<pre><code>def nullstelle(f,a,b,counter=0,TOL=10 ** -4):
counter = counter + 1
if counter &lt;= 100:
    g = f((a + b)/2)
    if f(a) * g &lt;= 0:
        b = (a + b)/2
    else:
        a = (a + b)/2
    if abs(a-b) &lt;= 2*TOL:
        return (a,b)
    else:
        nullstelle(f,a,b,counter,TOL)
else:
    return (a,b)
</code></pre>

<p>my problem is, that for the input</p>

<pre><code>def f(x):
return x ** 3 -2
nullstelle(f,0,3)
</code></pre>

<p>it does not return anything. I really do not understand how this is possibly.</p>

<p><em>Im sorry if this looks like a trivial question to you guys, but programming is absolutely not my main field of interest and I know nearly nothing about it (yet).</em></p>
