      FUNCTION EXPI(X)
C
C	THIS SUBROUTINE EVALUATES THE EXPONENTIAL INTEGRAL
C	OF THE FIRST KIND, USING A RATIONAL APPROXIMATION FROM
C	ABRAMOWITZ AND STEGUN
C
      DATA A0/-0.57721566/, A1/0.99999193/, A2/-0.24991055/
      DATA A3/0.05519968/, A4/-0.00976004/, A5/0.00107857/
      DATA AA1/2.334733/, AA2/0.250621/
      DATA BB1/3.330657/, BB2/1.681534/
      IF(X.GT.50.E00) GO TO 30
      IF(X.GT.1.0) GOTO 10
      EXPI=A0+A1*X+A2*X**2+A3*X**3+A4*X**4+A5*X**5-ALOG(X)
      GOTO 20
10    EXPI=(X**2+AA1*X+AA2)/(X**2+BB1*X+BB2)/(X*EXP(X))
20    RETURN
30    EXPI=0.E00
      RETURN
      END
