special_functions, a Fortran90 code which evaluates special functions, including Airy, Associated Legendre Bessel, Beta, Complete Elliptic Integral, Confluent Hypergeometric, Cosine Integral, Elliptic Integral, Error, Exponential Integral, Fresnel Integral, Gamma, Hankel, Hypergeometric, Incomplete Beta, Incomplete Gamma, Jacobian Elliptic, Kelvin, Lambda, Legendre, Mathieu, Modified Spherical Bessel, Parabolic Cylinder, Psi, Riccati-Bessel, Sine Integral, Spheroidal Wave, Struve, Whittaker, as well as Bernoulli Numbers, Euler Numbers, Hermite Polynomials, Laguerre Polynomials, Legendre Polynomials, by Shanjie Zhang, Jianming Jin.

Jianming Jin makes the text of the original FORTRAN77 source code available at https://in.ece.illinois.edu/routines/routines.html.


The FORTRAN77 source code of this library is copyrighted by Shanjie Zhang and Jianming Jin. However, they give permission to incorporate routines from this library into a user program provided that the copyright is acknowledged.


special_functions is available in a FORTRAN90 version.

Related Data and Programs:

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

fn, a FORTRAN90 code which evaluates elementary and special functions, by Wayne Fullerton.

polpak, a FORTRAN90 code which evaluates certain mathematical functions, especially some recursive polynomial families.

specfun, a FORTRAN90 code which computes special functions, including Bessel I, J, K and Y functions, and the Dawson, E1, EI, Erf, Gamma, Psi/Digamma functions, by William Cody and Laura Stoltz;


test_values, a FORTRAN90 code which contains a few test values of many functions.

toms715, a FORTRAN90 code which evaluates special functions, including the Bessel I, J, K, and Y functions of order 0, of order 1, and of any real order, Dawson's integral, the error function, exponential integrals, the gamma function, the normal distribution function, the psi function. This is a version of ACM TOMS algorithm 715.


  1. Shanjie Zhang, Jianming Jin,
    Computation of Special Functions,
    Wiley, 1996,
    ISBN: 0-471-11963-6,
    LC: QA351.C45.

Source Code:

Last revised on 28 August 2020.