` File: EXPI.FT of Tape: Various/ETH/eth11-1`
`(Source file text) `

```C     ..................................................................
C
C        SUBROUTINE EXPI
C
C        PURPOSE
C           COMPUTES THE EXPONENTIAL INTEGRAL -EI(-X)
C
C        USAGE
C           CALL EXPI(X,RES,AUX)
C
C        DESCRIPTION OF PARAMETERS
C           X     - ARGUMENT OF EXPONENTIAL INTEGRAL
C           RES   - RESULT VALUE
C           AUX   - RESULTANT AUXILIARY VALUE
C
C        REMARKS
C           X GT 87 MAY CAUSE UNDERFLOW
C           WITH THE EXPONENTIAL FUNCTION
C           FOR X = 0 THE RESULT VALUE IS SET TO -1.E37
C
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C           NONE
C
C        METHOD
C           DEFINITION
C           RES=INTEGRAL(EXP(-T)/T, SUMMED OVER T FROM X TO INFINITY).
C           EVALUATION
C           THREE DIFFERENT RATIONAL APPROXIMATIONS ARE USED IN THE
C           RANGES 1 LE X, X LE -9 AND -9 LT X LE -3 RESPECTIVELY,
C           A POLYNOMIAL APPROXIMATION IS USED IN -3 LT X LT 1.
C
C     ..................................................................
C
SUBROUTINE EXPI(X,RES,AUX)
IF(X-1.)2,1,1
1 Y=1./X
AUX=1.-Y*(((Y+3.377358E0)*Y+2.052156E0)*Y+2.709479E-1)/((((Y*
11.072553E0+5.716943E0)*Y+6.945239E0)*Y+2.593888E0)*Y+2.709496E-1)
RES=AUX*Y*EXP(-X)
RETURN
2 IF(X+3.)6,6,3
3 AUX=(((((((7.122452E-7*X-1.766345E-6)*X+2.928433E-5)*X-2.335379E-4
1)*X+1.664156E-3)*X-1.041576E-2)*X+5.555682E-2)*X-2.500001E-1)*X
2+9.999999E-1
RES=-1.E37
IF(X)4,5,4
4 RES=X*AUX-ALOG(ABS(X))-5.772157E-1
5 RETURN
6 IF(X+9.)8,8,7
7 AUX=1.-((((5.176245E-2*X+3.061037E0)*X+3.243665E1)*X+2.244234E2)*X
1+2.486697E2)/((((X+3.995161E0)*X+3.893944E1)*X+2.263818E1)*X
2+1.807837E2)
GOTO 9
8 Y=9./X
AUX=1.-Y*(((Y+7.659824E-1)*Y-7.271015E-1)*Y-1.080693E0)/((((Y
1*2.518750E0+1.122927E1)*Y+5.921405E0)*Y-8.666702E0)*Y-9.724216E0)
9 RES=AUX*EXP(-X)/X
RETURN
END
C
```