NuMFor 9f2ab49 (2024-04-08)
Numerical (Modern) Fortran. Library for Simple Numerical computing
|
Subroutine qags is a globally adaptive, automatic interval subdivisions with epsilon extrapolation without weights. More...
Subroutine qags is a globally adaptive, automatic interval subdivisions with epsilon extrapolation without weights.
The routine calculates an approximation to a definite integral applying adaptively the Gauss-Kronrod 21-point integration rule.
[in] | f | The function to integrate |
[in] | a | (real) lower limit of integration |
[in] | b | (real) upper limit of integration |
[in] | args | (real, array, optional) extra arguments (if needed) to be passed to the function f |
[out] | IntVal | (same kind as f ) Approximation to integral |
[in] | epsabs | (real, optional) Absolute accuracy requested. Default = 1.e-7 |
[in] | epsrel | (real, optional) Relative accuracy requested. Default = 1.e-5 |
[in] | gkrule | (char(len=4), optional) Choice of integration rule Possible values are: 'qk15', 'qk21', 'qk31', 'qk41', 'qk51', 'qk61'. Default = 'qk21'. |
[out] | abserr | (real, optional) Estimation of absolute error achieved |
[out] | neval | (integer, optional) Number of function evaluations performed |
[out] | ier | (integer, optional) Error code |
[in,out] | info | (optional) Information and workspace. Must be of type d_qp_extra for integration of real functions and of type c_qp_extra for integration of complex functions |
Either or both limits of integration may be infinite. By default it uses a Gauss-Kronrod rule of 21 points for finite limits.
For infinite limits use nf_minf for "minus infinite" and nf_inf for "plus infinite". A 15-points Gauss-Kronrod rule will be used by default but it will be overriden by the argument gkrule
.
The integration over the semi-infinite interval is performed by means of the mapping , onto the semi-open interval .
The integration over the semi-infinite interval is performed by means of the mapping , onto the semi-open interval .
The integral over the infinite interval is performed combining the two methods before, i.e: mapping onto the semi-open interval