!+ Function to calculate third expoential integral.
!
! Method:
!	For small arguments a power series is used. For larger
!	arguments a Pade approximant derived from the asymptotic
!	expansion is used.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77 with extensions listed in documentation. 
!
!- ---------------------------------------------------------------------
      FUNCTION E3_ACC01(X)
!
!
      IMPLICIT NONE
!
!
!     DUMMY ARGUMENTS
      REAL*8
     &     X
!             POINT OF EVALUATION
     &   , E3_ACC01
!             NAME OF FUNCTION
!
!     LOCAL VARIABLES
      REAL*8
     &     EULER
!             EULER'S CONSTANT
!
      PARAMETER(EULER=0.5772156D+00)
!
!
      IF (X.LT.1.0D-06) THEN
         E3_ACC01=0.5D+00
      ELSE IF (X.LT.2.0D+00) THEN
         E3_ACC01=-0.5D+00*X*X*LOG(X)+0.5D+00
     &      +X*(-1.0D+00+X*(0.75D+00-0.5D+00*EULER
     &      +X*(1.0D+00/6.0D+00-X*(1.0D+00/48.0D+00
     &      -X*(1.0D+00/3.60D+02-X*(1.0D+00/2.880D+03
     &      -X*(1.0D+00/2.5200D+04)))))))
      ELSE
!        WE USE A DOUBLY CUBIC PADE APPROXIMANT DERIVED FROM THE
!        ASYMPTOTIC EXPRESSION.
         E3_ACC01=(EXP(-X)/X)
     &      *(6.0D+00+X*(48.0D+00+X*(15.0D+00+X)))
     &      /(120.0D+00+X*(90.0D+00+X*(18.0D+00+X)))
      ENDIF
!
!
      RETURN
      END
