function [ab,dig]=dig_prudnikov_type_symm(N,nu,dig0,dd,nofdig,type)
%DIG_PRUDNIKOV_TYPE_SYMM Number of digits needed for polynomials orthogonal
%relative to a symmetric extension of the Prudnikov-type weight function. 
%   [AB,DIG]=DIG_PRUDNIKOV_TYPE_SYMM(N,NU,DIG0,DD,NOFDIG,TYPE) determines
%   the number of digits needed to obtain the first N recurrence
%   coefficients for a symmetric extension of the TYPE-type Prudnikov-type  
%   weight function to an accuracy of NODIG digits using the classical 
%   Chebyshev algorithm. It successively increments an initial estimate
%   DIG0 by DD units unil the required accuracy is achieved. The recurrence
%   coefficients to NOFDIG digits are placed into the Nx2 array AB.   


if type~=1 | type~=2
  disp('wrong type'); return
end
if type==1 & nu<=-1
  error('parameter out of range')
end
i=dig0-dd; 
maxerr=1
while maxerr>.5*10^(-nofdig)
  i=i+dd; dig=i
  mom=smom_prudnikov_type_symm(dig,N,nu,type);
  if i==dig0
    ab0=schebyshev(dig,N,mom');
  else
    ab1=schebyshev(dig,N,mom');
    serr=abs((ab1-ab0)./ab1);
    err=double(serr);
    maxerr=max(max(err)) 
    ab0=ab1;
  end
end
ab=vpa(ab1,nofdig);
