QUADPACK
Software library for numerical integration
title: "QUADPACK" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["fortran-libraries", "numerical-integration", "numerical-software", "public-domain-software-with-source-code"] description: "Software library for numerical integration" topic_path: "general/fortran-libraries" source: "https://en.wikipedia.org/wiki/QUADPACK" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Software library for numerical integration ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | QUADPACK |
| title | QUADPACK |
| author | Robert Piessens |
| Elise deDoncker-Kapenga | |
| Christoph W. Überhuber | |
| David Kahaner | |
| released | |
| latest release version | 11 October 2021 |
| latest preview date | |
| programming language | FORTRAN 77 |
| genre | Library |
| license | Public domain |
| website | |
| :: |
| name = QUADPACK | title = QUADPACK | collapsible = | author = Robert Piessens Elise deDoncker-Kapenga Christoph W. Überhuber David Kahaner | developer = | released = | discontinued = | latest release version = 11 October 2021 | latest release date = | latest preview version = | latest preview date = | programming language = FORTRAN 77 | operating system = | platform = | size = | language = | genre = Library | license = Public domain | website = QUADPACK is a FORTRAN 77 library for numerical integration (quadrature) of one-dimensional functions. It was included in the SLATEC Common Mathematical Library and is therefore in the public domain. The individual subprograms are also available on netlib.
The GNU Scientific Library reimplemented the QUADPACK routines in C. SciPy provides a Python 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.
::data[format=table]
| Q | Quadrature |
|---|---|
| :: |
| ::data[format=table]
| A | Adaptive |
|---|---|
| :: |
| ::data[format=table]
| W | Weight function of specified form |
|---|---|
| :: |
| ::data[format=table]
| C | Cauchy principal value |
|---|---|
| :: |
|} 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 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 (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 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_{-\infty}^{+\infty} f(x) dx = \int_0^1 {dt\over t^2} \left(f\left(\frac{1-t}{t}\right)
- f\left(-\frac{1-t}{t}\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 cos(ωx) f(x) or sin(ωx) f(x) over a finite interval ;QAWF : Fourier transform ;QAWS : integral of w(x) f(x) from a to b, where f is smooth and , with and α, β –1 ;QAWC : Cauchy principal value of the integral of f(x)/(x–c) for user-specified c and f
References
References
- "quadpack/changes". [[Netlib]].
- Fong, Kirby W.. (July 1993). "Guide to the SLATEC Common Mathematical Library". netlib.org.
- "quadpack". [[Netlib]].
- "scipy.integrate.quad -- SciPy v0.14.0 Reference Guide".
- Zwillinger, Daniel. (1992). "Handbook of integration". A K Peters.
- "QUADPACK". Numerical Integration, Nonlinear Equations & Software (NINES) Group, [[Katholieke Universiteit Leuven]].
- (October 2010). "integrate {stats}: Integration of One-Dimensional Functions". Documentation for package ‘stats’ version 2.13.0.
- "17.4 QAGS adaptive integration with singularities". [[Free Software Foundation]].
- (1983). "QUADPACK: A subroutine package for automatic integration". [[Springer-Verlag]].
- Piessens, Robert. (1984-04-17). "Subroutine QPDOC". [[netlib]].
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::