Question: Maple procedure doesnt give answer

Bisection := proc (f, a, b, delta)

local startpoint, endpoint, midpoint; startpoint := a; endpoint := b;

do midpoint := (1/2)*startpoint+(1/2)*endpoint;

if abs(startpoint-endpoint) < delta or abs(f(midpoint)) < delta then

return midpoint

elif f(midpoint) < 0 then endpoint := midpoint

elif 0 < f(midpoint) then startpoint := midpoint

end if end do end proc

 

I'm trying to do a procedure for bisection method but it doesnt give me answer when  I type 

Bisection (x-> x + 0.001 , 1, -1, 0.001 )

it returns Bisection (x-> x + 0.001 , 1, -1, 0.001 )

why this is happening, Is it because the procedure is wrong ? or does not provide answer 

Please Wait...