% EXAMPLE3_71  Computations for Example 3.71.
%
f1='%10.0f %8.3f %5.0f %20.14f %18.14f\n';
f2='%10.0f %8.3f %5.0f %15.9f %18.9f\n';
f3='%10.0f %8.3f %5.0f %10.4f %18.4f\n';
fprintf('\n')
om=[.2 .1 .05 .01 .001 0];
eps0=10^2*eps; nu0=1; numax=100;
disp('         p     om      nu        Re(R_p(z))         Im(R_p(z))')
for k=1:6
  a=om(k)*pi/2;
  ii=sqrt(-1);
  z=exp(ii*a); zm2=z^(-2);
  for p=2:3
    c=2^p*factorial(p-1);
    if p==2
      load -ascii absqm1log1;
      ab=absqm1log1;
    else
      load -ascii absqm1log2;
      ab=absqm1log2;
    end
    if k==5, eps0=10^6*eps; end
    if k==6, eps0=10^(10)*eps; end
    [rho,r,nu]=cauchy(0,ab,zm2,eps0,nu0,numax);
    rho(1)=rho(1)/(c*z);
    if k<5
      fprintf(f1,p,om(k),nu,real(rho(1)),imag(rho(1)))
    elseif k==5
      fprintf(f2,p,om(k),nu,real(rho(1)),imag(rho(1)))
    else
      fprintf(f3,p,om(k),nu,real(rho(1)),imag(rho(1)))
    end
  end
end
