Diferente pentru blog/your-bisection-search-is-wrong intre reviziile #16 si #17
Nu exista diferente intre titluri.
Diferente intre continut:
What else? The code doesn’t work for negative values of c. This is easily fixable: == code(python) |
def cubicRoot(c):{
def cubicRoot(c):
lo, hi = 0.0, c while lo * lo * lo != c: mid = (lo + hi) / 2
Instead of: ==code(python) |
while lo * lo * lo != c
while lo * lo * lo != c:
== switch to