home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / library / ssp / ghrmquad / dqh16.for next >
Text File  |  1985-11-29  |  2KB  |  69 lines

  1. C
  2. C     ..................................................................
  3. C
  4. C        SUBROUTINE DQH16
  5. C
  6. C        PURPOSE
  7. C           TO COMPUTE INTEGRAL(EXP(-X*X)*FCT(X), SUMMED OVER X FROM
  8. C                               -INFINITY TO +INFINITY).
  9. C
  10. C        USAGE
  11. C           CALL DQH16 (FCT,Y)
  12. C           PARAMETER FCT REQUIRES AN EXTERNAL STATEMENT
  13. C
  14. C        DESCRIPTION OF PARAMETERS
  15. C           FCT    - THE NAME OF AN EXTERNAL DOUBLE PRECISION FUNCTION
  16. C                    SUBPROGRAM USED.
  17. C           Y      - THE RESULTING DOUBLE PRECISION INTEGRAL VALUE.
  18. C
  19. C        REMARKS
  20. C           NONE
  21. C
  22. C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
  23. C           THE EXTERNAL DOUBLE PRECISION FUNCTION SUBPROGRAM FCT(X)
  24. C           MUST BE FURNISHED BY THE USER.
  25. C
  26. C        METHOD
  27. C           EVALUATION IS DONE BY MEANS OF 16-POINT GAUSSIAN-HERMITE
  28. C           QUADRATURE FORMULA, WHICH INTEGRATES EXACTLY WHENEVER
  29. C           FCT(X) IS A POLYNOMIAL UP TO DEGREE 31.
  30. C           FOR REFERENCE, SEE
  31. C           SHAO/CHEN/FRANK, TABLES OF ZEROS AND GAUSSIAN WEIGHTS OF
  32. C           CERTAIN ASSOCIATED LAGUERRE POLYNOMIALS AND THE RELATED
  33. C           GENERALIZED HERMITE POLYNOMIALS, IBM TECHNICAL REPORT
  34. C           TR00.1100 (MARCH 1964), PP.213-214.
  35. C
  36. C     ..................................................................
  37. C
  38.       SUBROUTINE DQH16(FCT,Y)
  39. C
  40. C
  41.       DOUBLE PRECISION X,Y,Z,FCT
  42. C
  43.       X=.46887389393058184D1
  44.       Z=-X
  45.       Y=.26548074740111822D-9*(FCT(X)+FCT(Z))
  46.       X=.38694479048601227D1
  47.       Z=-X
  48.       Y=Y+.23209808448652107D-6*(FCT(X)+FCT(Z))
  49.       X=.31769991619799560D1
  50.       Z=-X
  51.       Y=Y+.27118600925378815D-4*(FCT(X)+FCT(Z))
  52.       X=.25462021578474814D1
  53.       Z=-X
  54.       Y=Y+.9322840086241805D-3*(FCT(X)+FCT(Z))
  55.       X=.19517879909162540D1
  56.       Z=-X
  57.       Y=Y+.12880311535509974D-1*(FCT(X)+FCT(Z))
  58.       X=.13802585391988808D1
  59.       Z=-X
  60.       Y=Y+.8381004139898583D-1*(FCT(X)+FCT(Z))
  61.       X=.8229514491446559D0
  62.       Z=-X
  63.       Y=Y+.28064745852853368D0*(FCT(X)+FCT(Z))
  64.       X=.27348104613815245D0
  65.       Z=-X
  66.       Y=Y+.50792947901661374D0*(FCT(X)+FCT(Z))
  67.       RETURN
  68.       END
  69.