C
C     ..................................................................
C
C        SUBROUTINE SICI
C
C        PURPOSE
C           COMPUTES THE SINE AND COSINE INTEGRAL
C
C        USAGE
C           CALL SICI(SI,CI,X)
C
C        DESCRIPTION OF PARAMETERS
C           SI    - THE RESULTANT VALUE SI(X)
C           CI    - THE RESULTANT VALUE CI(X)
C           X     - THE ARGUMENT OF SI(X) AND CI(X)
C
C        REMARKS
C           THE ARGUMENT VALUE REMAINS UNCHANGED
C
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C           NONE
C
C        METHOD
C           DEFINITION
C           SI(X)=INTEGRAL(SIN(T)/T)
C           CI(X)=INTEGRAL(COS(T)/T)
C           EVALUATION
C           REDUCTION OF RANGE USING SYMMETRY.
C           DIFFERENT APPROXIMATIONS ARE USED FOR ABS(X) GREATER
C           THAN 4 AND FOR ABS(X) LESS THAN 4.
C           REFERENCE
C           LUKE AND WIMP, 'POLYNOMIAL APPROXIMATIONS TO INTEGRAL
C           TRANSFORMS',  MATHEMATICAL TABLES AND OTHER AIDS TO
C           COMPUTATION, VOL. 15, 1961, ISSUE 74, PP. 174-178.
C
C     ..................................................................
C
      SUBROUTINE SICI(SI,CI,X)
      Z=ABS(X)
      IF(Z-4.)1,1,4
    1 Y=(4.-Z)*(4.+Z)
      SI=-1.570797E0
      IF(Z)3,2,3
    2 CI=-1.E38
      RETURN
    3 SI=X*(((((1.753141E-9*Y+1.568988E-7)*Y+1.374168E-5)*Y+6.939889E-4)
     1*Y+1.964882E-2)*Y+4.395509E-1+SI/X)
      CI=((5.772156E-1+ALOG(Z))/Z-Z*(((((1.386985E-10*Y+1.584996E-8)*Y
     1+1.725752E-6)*Y+1.185999E-4)*Y+4.990920E-3)*Y+1.315308E-1))*Z
      RETURN
    4 SI=SIN(Z)
      Y=COS(Z)
      Z=4./Z
      U=((((((((4.048069E-3*Z-2.279143E-2)*Z+5.515070E-2)*Z-7.261642E-2)
     1*Z+4.987716E-2)*Z-3.332519E-3)*Z-2.314617E-2)*Z-1.134958E-5)*Z
     2+6.250011E-2)*Z+2.583989E-10
      V=(((((((((-5.108699E-3*Z+2.819179E-2)*Z-6.537283E-2)*Z
     1+7.902034E-2)*Z-4.400416E-2)*Z-7.945556E-3)*Z+2.601293E-2)*Z
     2-3.764000E-4)*Z-3.122418E-2)*Z-6.646441E-7)*Z+2.500000E-1
      CI=Z*(SI*V-Y*U)
      SI=-Z*(SI*U+Y*V)
      IF(X)5,6,6
    5 SI=3.141593E0-SI
    6 RETURN
      END
