fn


fn, a C code which approximates elementary and special functions using Chebyshev polynomials; functions include Airy, Bessel I, Bessel J, Bessel K, Bessel Y, beta, confluent hypergeometric, cosine integral, Dawson's integral, digamma (psi), error, exponential integral, gamma, hyperbolic cosine integral, hyperbolic sine integral, incomplete gamma, log gamma, logarithmic integral, Pochhammer, psi, sine integral, Spence; by Wayne Fullerton.

The original version of the library provided routines for complex, single precision real, and double precision real arguments and used the prefixes "C" and "D" to indicate the complex and double precision versions.

This scheme has been modified for consistency, and also to avoid conflict with the names of functions commonly provided by various compilers. The prefixes "C4_", "R4_" and "R8_" are used to indicate functions for complex, single precision real, and double precision real arguments. For example, the sine function can be calculated by the functions C4_SIN, R4_SIN or R8_SIN.

The original, true, correct version of FN is available through NETLIB: https://www.netlib.org/fn/index.html.

Licensing:

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

Languages:

fn 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:

BESSELJ, a C code which evaluates Bessel J functions of noninteger order.

C4LIB, a C code which implements certain elementary functions for "C4" or single precision complex variables using the C++ "complex " datatype.

C8LIB, a C code which implements certain elementary functions for "C8" or double precision complex variables using the C++ "complex " datatype.

CLAUSEN, a C code which evaluates a Chebyshev interpolant to the Clausen function Cl2(x).

CORDIC, a C code which uses the CORDIC method to compute certain elementary functions.

fn_test

GCC_INTRINSICS, a C code which tests or demonstrates some of the intrinsic functions provided by the G++ compiler.

MACHAR, a C code which computes the appropriate values of machine constants for a given machine.

MACHINE, a C code which stores the appropriate values of machine constants for a given machine.

POLPAK, a C code which evaluates certain mathematical functions, especially some recursive polynomial families.

R4LIB, a C code which contains many utility routines, using "R4" or "single precision real" arithmetic.

R8LIB, a C code which contains many utility routines, using "R8" or "double precision real" arithmetic.

TEST_VALUES, a C code which supplies test values of various mathematical functions.

Reference:

  1. Wayne Fullerton,
    Portable Special Function Routines,
    in Portability of Numerical Software,
    edited by Wayne Cowell,
    Lecture Notes in Computer Science, Volume 57, pages 452-483,
    Springer 1977,
    ISBN: 978-3-540-08446-4,
    LC: QA297.W65.

Source Code:


Last revised on 25 June 2019.