HOME

TheInfoList



OR:

QUADPACK is a FORTRAN 77
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
for
numerical integration In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equations ...
of one-dimensional functions. It was included in the
SLATEC SLATEC Common Mathematical Library is a FORTRAN 77 library of over 1400 general purpose mathematical and statistical routines. The code was developed at US Government research laboratories and is therefore public domain software. "SLATEC" is an a ...
Common Mathematical Library and is therefore in the
public domain The public domain (PD) consists of all the creative work A creative work is a manifestation of creative effort including fine artwork (sculpture, paintings, drawing, sketching, performance art), dance, writing (literature), filmmaking, ...
. The individual subprograms are also available on
netlib Netlib is a repository of software for scientific computing maintained by AT&T, Bell Laboratories, the University of Tennessee and Oak Ridge National Laboratory. Netlib comprises many separate programs and libraries. Most of the code is written in ...
. 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; wrappers are available for other programming languages. The GSL is part of the GNU Project and is d ...
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, FFT, signal ...
provides a
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
interface to part of QUADPACK.


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 Adaptive quadrature is a numerical integration method in which the integral of a function f(x) is approximated using static quadrature rules on adaptively refined subintervals of the region of integration. Generally, adaptive algorithms are just ...
. 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 number format, usually occupying 64 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point. Flo ...
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 high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
(the quad command) and R (the integrate function). ;QAGS : uses global
adaptive quadrature Adaptive quadrature is a numerical integration method in which the integral of a function f(x) is approximated using static quadrature rules on adaptively refined subintervals of the region of integration. Generally, adaptive algorithms are just ...
based on 21-point Gauss–Kronrod quadrature within each subinterval, with
acceleration In mechanics, acceleration is the rate of change of the velocity of an object with respect to time. Accelerations are vector quantities (in that they have magnitude and direction). The orientation of an object's acceleration is given by the ...
by Peter Wynn's
epsilon algorithm Epsilon (, ; uppercase , lowercase or #Glyph variants, lunate ; el, έψιλον) is the fifth letter of the Greek alphabet, corresponding phonetically to a mid front unrounded vowel or . In the system of Greek numerals it also has the value ...
. ;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 This is a list of numerical libraries, which are libraries used in software development for performing numerical calculations. It is not a complete listing but is instead a list of numerical libraries with articles on Wikipedia, with few exceptio ...


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 (quadrature) Numerical software Public-domain software with source code