function xstar=bisectie(fhandle, a, b, tol)
  xstar=[];
  if feval(fhandle, a)*feval(fhandle, b)>0
    fprintf('Nu putem aplica bisectia\n');
    return;
  end
  iter = 0;
  while(b-a>tol) 
    c=(a+b)/2;
    iter = iter+1;
    if feval(fhandle,c)*feval(fhandle,b)<0
      a=c;
    else 
      b=c;
    end
    fprintf('Iter = %d, c = %8.6f\n', iter, c);
  end
  
  xstar=c;
