%RUN_VCONJ_LOG!

tic
global a ab0 ab1
a=1/2;
ab0=r_jacobi01(75,0,a);
%
% Recurrence coefficients for the weight function
% w(x)=x^a*log(1/x) on [0,1] taken from W. Gautschi, ``A Software
% Repository for Orthogonal Polynomials'', SIAM e-book, 2018,
% 2.3.1, 2.4.1, 2.4.3
%
if a==0
  ab1=loadvpa('coeff_lalg0log1.txt',9,32,200,2);
elseif a==-1/2
  ab1=loadvpa('coeff_lalgm1halflog1.txt',9,32,200,2);
elseif a==1/2
  ab1=loadvpa('coeff_lalg1halflog1.txt',9,32,200,2);
else
  error('value of a illegitimate');
end
ab1=double(ab1);
for n=1:75
  n
  dig=32; [V,d1]=Vconj_log1(dig,n); errd=1;
  while errd > .5e-6
    dig=dig+4;
    d0=d1; d00=d0;
    for j=1:n
      if imag(d00(j))<0, d00(j)=conj(d00(j)); end
    end
    [V,d1]=Vconj_log1(dig,n); d11=d1;
    for j=1:n
      if imag(d11(j))<0, d11(j)=conj(d11(j)); end
    end
    err=abs((d00-d11)./d11);
    errd=max(err);
  end
%  toc
  dig;
  d=d1;
  for k=1:n
    if imag(d(k))==0
      d(k)=d(k)+(1e-20)*i; break
    end
  end
%  plot(d,'k*','MarkerSize',16);set(gca,'FontSize',24) 
%  axis([0 .3 -.15 .15])
  for i=1:n
    if real(d(i))<=0, error('conjecture is false'); end
  end
end
disp('conjecture is true')
toc
