% TABLE2_6 Computation of Table 2.6.
%
f1='%7.1f %5.0f %9.2e %9.2e %9.2e\n';
f2='%13.0f %9.2e %9.2e %9.2e\n';
fprintf('\n')
disp('   Table 2.6 Condition number and error')
disp('   magnification for a logarithmic measure')
disp('   using Legendre moments')
fprintf('\n')
disp('   alpha   n   (2.1.50)    maga      magb')
load -ascii abjaclog;
abexact=abjaclog;
N=100; mom=zeros(1,2*N); 
all=[-1/2 0 1/2];
for k=1:3
  al=all(k); 
  abj=r_jacobi01(2*N);
  ab=r_jaclog(N,al);
  for n=25:25:100
    ac=acondG(n,ab,abj);
    ea=abs(ab(1:n,1)-abexact((k-1)*N+1:(k-1)*N+n,1));
    eb=abs(ab(1:n,2)-abexact((k-1)*N+1:(k-1)*N+n,2));
    maga=max(double(ea)/eps); magb=max(double(eb)/eps);
    if n==25
      fprintf(f1,al,n,ac,maga,magb)
    else
      fprintf(f2,n,ac,maga,magb)  
    end
  end
  fprintf('\n')
end
