Jon Simpson

Bisection Algorithm General Form

08 Jan 2006 — university, algorithm

For my own personal, later reference.

Check input, stop if f(a) * f(b) > 0
while (result not accurate enough)
    c = (a + b) / 2
    if (f(a) * f(c) > 0)
        a = c
    else
        b = c
    end if
end while

With an error band of |a - b| / 2


54 words.

 Home