% TABLE2_24  Computations for Table2.24.
f1='%18.4f %6.0f %5.0f %5.0f %5.0f %12.3e %11.3e\n';
fprintf('\n')
disp('            Modification by a linear divisor using gchri1 and chri4')
fprintf('\n')
N=40; numax=500; eps0=100*eps;
tic
%for a=-.8:.4:.8
%  for b=a:.4:.81
for a=0
  for b=0
    disp('              x       nu0    nu  nus0  nus0      erra        errb')
    x=[-1.001 -1.01 -1.04 -1.07 -1.1];
    for ix=1:5
      nu0=nu0jac(2*N-1,x(ix),eps0);
      nus0=nu0jac(N,x(ix),eps0);
      ab0=r_jacobi(numax,a,b);
      [abgc,rho,nu]=gchri1(N,ab0,x(ix),eps0,nu0,numax);
      rho0=real(rho(1));
      [abcs,nus]=chri4(N,ab0,x(ix),eps0,nus0,numax,rho0,1);
      erra=abs(abgc(:,1)-abcs(:,1));
      errb=abs((abgc(:,2)-abcs(:,2))./abgc(:,2));
      err=[erra errb];
      errm=max(err);
      fprintf(f1,x(ix),nu0,nu,nus0,nus,errm)
    end
    fprintf('\n')
  end
end
toc
