function ab=sr_pollaczek(nofdig,N)
%SR_POLLACZEK Recurrence coefficients for orthogonal polynomials
%relative to a Pollaczek-type weight function.
%   AB=SR_POLLACZEK(NOFDIG,N) uses a multicomponent discretization
%   procedure to generate in DIG-digit arithmetic the first 
%   N recurrence coefficients for polynomials orthogonal with
%   respect to the weight function w(x)=exp(-(1-x^2)^(-A)) on
%   [-1,1] and places them to NOFDIG digits into the Nx2
%   array AB. The parameters DIG and A have to be entered
%   when prompted. Be sure to insert the proper weight function
%   wf at the end of the routine squadgp.m and declare dig and a 
%   to be global variables.

global mc mp iq idelta irout DM uv AB dig a 
%dig=input('enter the value of dig')
%a=input('enter the value of a')
digits(dig);
if a>8 & a<=10 
  mc=5; 
  AB=[[vpa(-1) vpa(-.5)];[vpa(-.5) vpa(-.2)];[vpa(-.2) vpa(.2)]; ...
  [vpa(.2) vpa(.5)];[vpa(.5) vpa(1)]];
elseif a>1/2 
  mc=5; 
  AB=[[vpa(-1) vpa(-.95)];[vpa(-.95) vpa(-.6)];[vpa(-.6) vpa(.6)]; ...
  [vpa(.6) vpa(.95)];[vpa(.95) vpa(1)]];
elseif a>=1/10
  mc=27; s1=vpa(1);
  AB=[[-s1+vpa(10^(-22)) -s1+vpa(10^(-18))];
  [-s1+vpa(10^(-18)) -s1+vpa(10^(-15))];[vpa(-.999999999999999) vpa(-.999999999999)]; ...
  [vpa(-.999999999999) vpa(-.9999999999)];[vpa(-.9999999999) vpa(-.99999999)];[vpa(-.99999999) vpa(-.9999999)]; ...
  [vpa(-.9999999) vpa(-.999999)];[vpa(-.999999) vpa(-.99999)];[vpa(-.99999) vpa(-.9999)];[vpa(-.9999) vpa(-.999)]; ...
  [vpa(-.999) vpa(-.99)];[vpa(-.99) vpa(-.9)];[vpa(-.9) vpa(-.6)];[vpa(-.6) vpa(.6)];[vpa(.6) vpa(.9)]; ... 
  [vpa(.9) vpa(.99)];[vpa(.99) vpa(.999)];[vpa(.999) vpa(.9999)];[vpa(.9999) vpa(.99999)]; ...
  [vpa(.99999) vpa(.999999)];[vpa(.999999) vpa(.9999999)];[vpa(.9999999) vpa(.99999999)];[vpa(.99999999) vpa(.9999999999)]; ...
  [vpa(.9999999999) vpa(.999999999999)];[vpa(.999999999999) vpa(.999999999999999)];[s1-vpa(10^(-15)) s1-vpa(10^(-18))]; 
  [s1-vpa(10^(-18)) s1-vpa(10^(-22))]];
else
  error('input parameter a out of range')
end
mp=0; iq=0; idelta=1; irout=1; Mmax=1000;
eps0=.5*10^(-nofdig); 
ab1=smcdis(dig,N,eps0,@squadgp,Mmax);
ab=vpa(ab1,nofdig);
