SUNY Geneseo Department of Mathematics
Friday, March 27
Math 230 02
Spring 2015
Prof. Doug Baldwin
bisection( f, xl, xu, es )
xm = ( xl + xu ) / 2
ea = es + 1
while ea > es
if f(xm) f(xl) < 0
xu = xm
if f(xm) f(xl) > 0
xl = xm
otherwise
stop
xn = ( xl + xu ) / 2
ea = abs( ( xn - xm ) / xn )
xm = xn
end of while
x = initial candidate
while x does not satisfy search goal
update x