Sample Function Values

TEST_VALUES is a MATLAB library which returns a few selected values of various functions.

The intent of TEST_VALUES is to provide a means of making very simple tests for correctness of software designed to compute a variety of functions. The testing can be done automatically. The data provided is generally skimpy, and might not test the algorithm over a suitably wide range. It does, however, provide a small amount of reassurance that a given computation is (or is not) computing the appropriate quantity, and doing so reasonably accurately.


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


TEST_VALUES is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

CORDIC, a MATLAB library which use the CORDIC method to compute certain elementary functions.

FN, a MATLAB library which approximates elementary and special functions using Chebyshev polynomials, by Wayne Fullerton.

GSL, a C++ library which evaluates many special functions.

LEGENDRE_POLYNOMIAL, a MATLAB library which evaluates the Legendre polynomial and associated functions.

POLPAK, a MATLAB library which computes various mathematical functions; test values for many of these functions are available in TEST_VALUES.

PROB, a MATLAB library which computes various statistical functions; test values for many of these functions are available in TEST_VALUES.

SPECFUN, a FORTRAN77 library which computes various special functions, particularly Bessel functions.

STEAM, a FORTRAN90 library which computes various functions related to the physical properties of water; test values for many of these functions are available in TEST_VALUES.


  1. Milton Abramowitz, Irene Stegun,
    Handbook of Mathematical Functions,
    National Bureau of Standards, 1964,
    ISBN: 0-486-61272-4,
    LC: QA47.A34.
  2. Lester Haar, John Gallagher, George Kell,
    NBS/NRC Steam Tables:
    Thermodynamic and Transport Properties and Computer Programs for Vapor and Liquid States of Water in SI Units,
    Hemisphere Publishing Corporation, Washington, 1984,
    ISBN: 0-89116-353-0,
    LC: TJ270.H3.
  3. Allan McLeod,
    Algorithm 757: MISCFUN: A software package to compute uncommon special functions,
    ACM Transactions on Mathematical Software,
    Volume 22, Number 3, September 1996, pages 288-301.
  4. Frank Powell,
    Statistical Tables for Sociology, Biology and Physical Sciences,
    Cambridge University Press, 1982,
    ISBN: 0521284732,
    LC: QA276.25.S73.
  5. Eric Weisstein,
    CRC Concise Encyclopedia of Mathematics,
    CRC Press, 2002,
    Second edition,
    ISBN: 1584883472,
    LC: QA5.W45
  6. Stephen Wolfram,
    The Mathematica Book,
    Fourth Edition,
    Cambridge University Press, 1999,
    ISBN: 0-521-64314-7,
    LC: QA76.95.W65.
  7. Daniel Zwillinger, editor,
    CRC Standard Mathematical Tables and Formulae,
    30th Edition,
    CRC Press, 1996,
    ISBN: 0-8493-2479-3,
    LC: QA47.M315.
  8. Daniel Zwillinger, Steven Kokoska,
    Standard Probability and Statistical Tables,
    CRC Press, 2000,
    ISBN: 1-58488-059-7,
    LC: QA273.3.Z95.

Source Code:

Examples and Tests:

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

Last revised on 02 February 2017.