C
C     ..................................................................
C
C        SUBROUTINE DQG24
C
C        PURPOSE
C           TO COMPUTE INTEGRAL(FCT(X), SUMMED OVER X FROM XL TO XU)
C
C        USAGE
C           CALL DQG24 (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 24-POINT GAUSS QUADRATURE
C           FORMULA, WHICH INTEGRATES POLYNOMIALS UP TO DEGREE 47
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 DQG24(XL,XU,FCT,Y)
C
C
      DOUBLE PRECISION XL,XU,Y,A,B,C,FCT
C
      A=.5D0*(XU+XL)
      B=XU-XL
      C=.49759360999851068D0*B
      Y=.61706148999935998D-2*(FCT(A+C)+FCT(A-C))
      C=.48736427798565475D0*B
      Y=Y+.14265694314466832D-1*(FCT(A+C)+FCT(A-C))
      C=.46913727600136638D0*B
      Y=Y+.22138719408709903D-1*(FCT(A+C)+FCT(A-C))
      C=.44320776350220052D0*B
      Y=Y+.29649292457718390D-1*(FCT(A+C)+FCT(A-C))
      C=.41000099298695146D0*B
      Y=Y+.36673240705540153D-1*(FCT(A+C)+FCT(A-C))
      C=.37006209578927718D0*B
      Y=Y+.43095080765976638D-1*(FCT(A+C)+FCT(A-C))
      C=.32404682596848778D0*B
      Y=Y+.48809326052056944D-1*(FCT(A+C)+FCT(A-C))
      C=.27271073569441977D0*B
      Y=Y+.53722135057982817D-1*(FCT(A+C)+FCT(A-C))
      C=.21689675381302257D0*B
      Y=Y+.57752834026862801D-1*(FCT(A+C)+FCT(A-C))
      C=.15752133984808169D0*B
      Y=Y+.60835236463901696D-1*(FCT(A+C)+FCT(A-C))
      C=.9555943373680815D-1*B
      Y=Y+.62918728173414148D-1*(FCT(A+C)+FCT(A-C))
      C=.32028446431302813D-1*B
      Y=B*(Y+.63969097673376078D-1*(FCT(A+C)+FCT(A-C)))
      RETURN
      END
