Jon Simpson’s Weblog

My personal space for ideas & information.

Bisection Algorithm General Form

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

Previous: Managing Wordpress installs with Subversion Next: A good day for Apple & Mac fans.

One Comment

  1. Oliver Cole says:

    Hmmm… looks distinctly dodgy to me..

    :P

Leave a Reply