function [ab,dig]=dig_Enu(N,nu,dig0,dd,nofdig)
%DIG_ENU Number of digits needed for polynomials orthogonal with
%respect to the exponential integral.
%   [AB,DIG]=DIG_ENU(N,NU,DIG0,DD,NOFDIG) determines the number DIG 
%   of digits needed to obtain the first N recurrence coefficients
%   for the weight function W(X)=E_NU(X) on (0,INF] to an accuracy
%   of NOFDIG decimal digits using the classical Chebyshev algorithm.
%   The routine successively increments an initial estimate DIG0 by
%   DD units until the required accuracy is achieved. The recurrence
%   coefficients to NOFDIG digits are placed into the Nx2 array AB.

i=dig0-dd; 
maxerr=1;
while maxerr>.5*10^(-nofdig)
  i=i+dd; dig=i
  mom=smom_Enu(dig,N,nu);
  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);
