C
C     ..................................................................
C
C        SUBROUTINE DQG16
C
C        PURPOSE
C           TO COMPUTE INTEGRAL(FCT(X), SUMMED OVER X FROM XL TO XU)
C
C        USAGE
C           CALL DQG16 (XL,XU,FCT,Y)
C           PARAMETER FCT REQUIRES AN EXTERNAL STATEMENT
C
C        DESCRIPTION OF PARAMETERS
C           XL     - DOUBLE PRECISION LOWER BOUND OF THE INTERVAL.
C           XU     - DOUBLE PRECISION UPPER BOUND OF THE INTERVAL.
C           FCT    - THE NAME OF AN EXTERNAL DOUBLE PRECISION FUNCTION
C                    SUBPROGRAM USED.
C           Y      - THE RESULTING DOUBLE PRECISION INTEGRAL VALUE.
C
C        REMARKS
C           NONE
C
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C           THE EXTERNAL DOUBLE PRECISION FUNCTION SUBPROGRAM FCT(X)
C           MUST BE FURNISHED BY THE USER.
C
C        METHOD
C           EVALUATION IS DONE BY MEANS OF 16-POINT GAUSS QUADRATURE
C           FORMULA, WHICH INTEGRATES POLYNOMIALS UP TO DEGREE 31
C           EXACTLY. FOR REFERENCE, SEE
C           V.I.KRYLOV, APPROXIMATE CALCULATION OF INTEGRALS,
C           MACMILLAN, NEW YORK/LONDON, 1962, PP.100-111 AND 337-340.
C
C     ..................................................................
C
      SUBROUTINE DQG16(XL,XU,FCT,Y)
C
C
      DOUBLE PRECISION XL,XU,Y,A,B,C,FCT
C
      A=.5D0*(XU+XL)
      B=XU-XL
      C=.49470046749582497D0*B
      Y=.13576229705877047D-1*(FCT(A+C)+FCT(A-C))
      C=.47228751153661629D0*B
      Y=Y+.31126761969323946D-1*(FCT(A+C)+FCT(A-C))
      C=.43281560119391587D0*B
      Y=Y+.47579255841246392D-1*(FCT(A+C)+FCT(A-C))
      C=.37770220417750152D0*B
      Y=Y+.62314485627766936D-1*(FCT(A+C)+FCT(A-C))
      C=.30893812220132187D0*B
      Y=Y+.7479799440828837D-1*(FCT(A+C)+FCT(A-C))
      C=.22900838882861369D0*B
      Y=Y+.8457825969750127D-1*(FCT(A+C)+FCT(A-C))
      C=.14080177538962946D0*B
      Y=Y+.9130170752246179D-1*(FCT(A+C)+FCT(A-C))
      C=.47506254918818720D-1*B
      Y=B*(Y+.9472530522753425D-1*(FCT(A+C)+FCT(A-C)))
      RETURN
      END
