% JACCONJ
%
function [b0,diff]=jacconj(n,a,db)
eps0=1e10*eps; 
%if a==-.5, b=a; else b=-a-1-db; end
b=-.5-db;
%b=-.5+db;
k0=0; diff=0;
while k0==0 & b>-1
  b=b+db;
%  b=b-db;
  [k0,r0]=ineq(n,a,b);
  if k0-r0>diff, diff=k0-r0; end
end
b0=0;
if k0>0
  br=b; bl=b-db;
%  br=b+db; bl=b;
  while br-bl>eps0
    b0=.5*(bl+br);
    [k0,r0]=ineq(n,a,b0);
    if k0-r0>diff, diff=k0-r0; end
    if k0>0
      br=b0;
%      bl=b0;
    else
      bl=b0;
%      br=b0;
    end
  end
end
