TEST_APPROX
Test Functions for
Approximation and Interpolation


TEST_APPROX is a FORTRAN90 library which can test approximation and interpolation software.

TEST_APPROX contains a number of functions Y=F(X) that can be evaluated at any point, and some vectors of data (X(1:N),Y(1:N)) for which no underlying functional relationship is given. When a function is supplied, then a data vector of any dimension can be generated for a test.

The task of interpolation software is to find, from some given class of functions, the function G(X) which exactly matches the known data values. That is, G(X(1:N)) = Y(1:N).

The task of approximation software is to find, from some given class of functions, the function H(X) for which some approximation error is minimized. There are many forms of error measurement. For instance, the error might simply be the sum of the differences of the function and the data at the data abscissas:

l1(X) = sum ( 1 <= I <= N ) abs ( H(X(I)) - Y(I) )
or the square root of the sum of squares
l2(X) = sqrt ( sum ( 1 <= I <= N ) ( H(X(I)) - Y(I) )**2 )
or the maximum pointwise error:
l_inf(X) = max ( abs ( H(X(I)) - Y(I) ) )
In cases where a functional form is given, the error might be measured in terms of the integral of the absolute value of the difference over some interval:
L1(X,A,B) = integral ( A <= X <= B ) abs ( H(X) - F(X) ) dx
and so on.

Related Data and Programs:

DIVDIF is a FORTRAN90 library of routines which includes many routines to construct and evaluate divided difference interpolants.

PPPACK is a FORTRAN90 library of routines which implements Carl de Boor's piecewise polynomial functions, including, particularly, cubic splines.

PS_WRITE is a FORTRAN90 library of routines for creating PostScript images. A number of routines were "borrowed" from this library for use by the test program.

SPLINE is a FORTRAN90 library of routines which includes many routines to construct and evaluate spline interpolants and approximants.

Reference:

  1. Samuel Conte, Carl deBoor,
    Elementary Numerical Analysis,
    Second Edition,
    McGraw Hill, 1972,
    ISBN: 07-012446-4,
    LC: QA297.C65.
  2. Carl deBoor,
    A Practical Guide to Splines,
    Springer, 2001,
    ISBN: 0387953663,
    LC: QA1.A647.v27.
  3. Max Waldmeier,
    The Sunspot-Activity in the Years 1610-1960,
    Shulthess, 1961,
    LC: QB525.W34.

Source Code:

Examples and Tests:

A few of the tests create graphics output files:

List of Routines:

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


Last revised on 16 November 2006.