function root = bisectioneg(a,b,tol)
%BISECTION METHOD - Modify function below, then can 
%   find its roots in [a,b] to tolerance tol
f = @(x) x^3 + 4*x^2 - 10;
while (abs(b-a) >= tol)
    m = (a+b)/2
    if (f(m) == 0)
        break;
    elseif(f(b)*f(m) < 0)
        a = m;
    else
        b = m;
    end
end
root = m;
end

