Quadrature Rule Applied to Genz Integrals

QUADRATURE_TEST_GENZ is a FORTRAN90 program which reads three files that define a quadrature rule, applies the quadrature rule to the set of Genz test integrals, and reports the results.

The quadrature rule is defined by three text files:

  1. the "X" file lists the abscissas (N rows, M columns);
  2. the "W" file lists the weights (N rows);
  3. the "R" file lists the integration region corners (2 rows, M columns);
For more on quadrature rules, see the QUADRATURE_RULES listing below.

The Genz integrand functions include:

  1. "Oscillatory": f(x) = cos ( 2 * pi * r + sum ( c(1:m) * x(1:m) ) );
  2. "Product Peak": f(x) = 1 / product ( c(1:m)**2 + (x(1:m) - x0(1:m))**2);
  3. "Corner Peak": f(x) = 1 / ( 1 + sum ( c(1:m) * x(1:m) ) )**(m+r);
  4. "Gaussian": f(x) = exp(-sum(c(1:m)**2 * ( x(1:m) - x0(1:m))**2 ) );
  5. "Continuous": f(x) = exp ( - sum ( c(1:m) * abs ( x(1:m) - x0(1:m) ) ) );
  6. "Discontinuous": f(x) = exp(sum(c(1:m)*x(1:m)) for x(1:m) <= x0(1:m), 0 otherwise;


quadrature_test_genz prefix

the common prefix for the files containing the abscissa (X), weight (W) and region (R) information of the quadrature rule;

If the arguments are not supplied on the command line, the program will prompt for them.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


QUADRATURE_TEST_GENZ is available in a FORTRAN90 version.

Related Data and Programs:

GSL, a C++ library which includes routines for estimating multidimensional integrals.

INTEGRAL_TEST, a FORTRAN90 program which uses test integrals to evaluate sets of quadrature points.

NINT_EXACTNESS, a FORTRAN90 program which demonstrates how to measure the polynomial exactness of a multidimensional quadrature rule.

NINTLIB, a FORTRAN90 library which numerically estimates integrals in multiple dimensions.

QUADRATURE_RULES, a dataset directory which contains a description and examples of quadrature rules defined by a set of "X", "W" and "R" files.

QUADRATURE_TEST, a FORTRAN90 program which reads files defining a quadrature rule, and applies them to all the test integrals defined by TEST_NINT.

STROUD, a FORTRAN90 library which contains quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_NINT, a FORTRAN90 library which defines a set of integrand functions to be used for testing multidimensional quadrature rules and routines.

TESTPACK, a FORTRAN90 library which defines a set of integrands used to test multidimensional quadrature.


  1. Alan Genz,
    Testing Multidimensional Integration Routines,
    in Tools, Methods, and Languages for Scientific and Engineering Computation,
    edited by B Ford, JC Rault, F Thomasset,
    North-Holland, 1984, pages 81-94,
    ISBN: 0444875700,
    LC: Q183.9.I53.
  2. Alan Genz,
    A Package for Testing Multiple Integration Subroutines,
    in Numerical Integration: Recent Developments, Software and Applications,
    edited by Patrick Keast, Graeme Fairweather,
    Reidel, 1987, pages 337-340,
    ISBN: 9027725144,
    LC: QA299.3.N38.

Source Code:

Examples and Tests:

CC_D2_LEVEL4 is a Clenshaw-Curtis sparse grid quadrature rule in dimension 2 of level 4, 65 points.

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 17 October 2007.