a = 0.05;
b = 0.15;
tol = 0.0005;

S = 100;
K = 110;
r = 0.02;
T = 1;
cMarket = 1.35;

while (b-a > tol)
    if callBS(S,K,T,(a+b)/2, r) - cMarket > 0
        b = (a+b)/2;
    else
        a = (a+b)/2;
    end
end

a