QUADPACK
   HOME

TheInfoList



OR:

QUADPACK is a FORTRAN 77
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
for
numerical integration In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral. The term numerical quadrature (often abbreviated to quadrature) is more or less a synonym for "numerical integr ...
(quadrature) of one-dimensional functions. It was included in the SLATEC Common Mathematical Library and is therefore in the
public domain The public domain (PD) consists of all the creative work to which no Exclusive exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly Waiver, waived, or may be inapplicable. Because no one holds ...
. The individual subprograms are also available on netlib. The
GNU Scientific Library The GNU Scientific Library (or GSL) is a software library for numerical computations in applied mathematics and science. The GSL is written in C (programming language), C; wrappers are available for other programming languages. The GSL is part of ...
reimplemented the QUADPACK routines in C.
SciPy SciPy (pronounced "sigh pie") is a free and open-source Python library used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, fast Fourier ...
provides a Python interface to part of QUADPACK. Th
pm_quadpack
module of the ParaMonte library offers a 100% type-kind-generic multi-precision implementation of QUADPACK library in modern Fortran.


Routines

The main focus of QUADPACK is on ''automatic'' integration routines in which the user inputs the problem and an absolute or relative error tolerance and the routine attempts to perform the integration with an error no larger than that requested. There are nine such automatic routines in QUADPACK, in addition to a number of non-automatic routines. All but one of the automatic routines use adaptive quadrature. Each of the adaptive routines also have versions suffixed by E that have an extended parameter list that provides more information and allows more control.
Double precision Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point arithmetic, floating-point computer number format, number format, usually occupying 64 Bit, bits in computer memory; it represents a wide range of numeri ...
versions of all routines were released with prefix D.


General-purpose routines

The two general-purpose routines most suitable for use without further analysis of the integrand are QAGS for integration over a finite interval and QAGI for integration over an infinite interval. These two routines are used in
GNU Octave GNU Octave is a scientific programming language for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly ...
(the quad command) and R (the integrate function). ;QAGS : uses global adaptive quadrature based on 21-point Gauss–Kronrod quadrature within each subinterval, with
acceleration In mechanics, acceleration is the Rate (mathematics), rate of change of the velocity of an object with respect to time. Acceleration is one of several components of kinematics, the study of motion. Accelerations are Euclidean vector, vector ...
by Peter Wynn's epsilon algorithm. ;QAGI : is the only general-purpose routine for infinite intervals, and maps the infinite interval onto the semi-open interval (0,1] using a transformation then uses the same approach as QAGS, except with 15-point rather than 21-point Gauss–Kronrod quadrature. For an integral over the whole real line, the transformation used is x = (1-t)/t: \int_^ f(x) dx = \int_0^1 \left(f\left(\frac\right) + f\left(-\frac\right)\right) \;. This is not the best approach for all integrands: another transformation may be appropriate, or one might prefer to break up the original interval and use QAGI only on the infinite part.


Brief overview of the other automatic routines

;QNG : simple non-adaptive integrator ;QAG : simple adaptive integrator ;QAGP : similar to QAGS but allows user to specify locations of internal singularities, discontinuities etc. ;QAWO : integral of or over a finite interval ;QAWF : Fourier transform ;QAWS : integral of from to , where is smooth and , with and ;QAWC : Cauchy principal value of the integral of for user-specified and


See also

* List of numerical libraries


References


Further reading

* * {{Cite journal , last1 = Cools , first1 = R. , last2 = Haegemans , first2 = A. , doi = 10.1145/838250.838253 , title = Algorithm 824: ''CUBPACK'': a package for automatic cubature; framework description, journal = ACM Transactions on Mathematical Software , volume = 29 , issue = 3 , pages = 287–296, year = 2003 , s2cid = 6855610 Fortran libraries Numerical integration Numerical software Public-domain software with source code