Testing Multidimensional Integration Routines
a C program which
demonstrates the testing of a routine for multidimensional
In this case, the code being tested is a subroutine known as
ADAPT, written by Genz. The code is tested on six test integrand
functions, also defined by Genz. The test is done with a variety
of spatial dimensions, parameter values, and difficulty factors.
With M denoting the spatial dimension, R a parameter,
C a scaling vector, and X0 a displacement vector,
the test functions can be summarized as:
f(x) = cos ( 2 * pi * r + sum ( c(1:m) * x(1:m) ) ),
f(x) = 1 / product ( c(1:m)^2 + (x(1:m) - x0(1:m))^2),
Genz "Product Peak";
f(x) = 1 / ( 1 + sum ( c(1:m) * x(1:m) ) )^(m+r),
Genz "Corner Peak";
f(x) = exp(-sum(c(1:m)^2 * ( x(1:m) - x0(1:m))^2 ) ),
f(x) = exp ( - sum ( c(1:m) * abs ( x(1:m) - x0(1:m) ) ) ),
f(x) = exp(sum(c(1:m)*x(1:m)) for x(1:m) <= x0(1:m), 0 otherwise,
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
TESTPACK is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
a C library which
defines a variety of
(mostly 1-dimensional) quadrature rules.
a C library which
defines a variety of quadrature rules over various "interesting"
Testing Multidimensional Integration Routines,
in Tools, Methods, and Languages for Scientific and
edited by B Ford, JC Rault, F Thomasset,
North-Holland, 1984, pages 81-94,
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,
John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thatcher,
A More Portable Fortran Random Number Generator,
ACM Transactions on Mathematical Software,
Volume 5, Number 2, June 1979, pages 132-138.
Last revised on 15 August 2016.