asa121, a FORTRAN90 code which evaluates the trigamma function, by BE Schneider.

The code is Applied Statistics Algorithm 121.


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


asa121 is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

ASA103, a FORTRAN90 code which evaluates the digamma function.


TEST_VALUES, a FORTRAN90 code which contains sample values for a number of special functions.


Original FORTRAN77 version by BE Schneider; FORTRAN90 version by John Burkardt.


  1. BE Schneider,
    Algorithm AS 121: Trigamma Function,
    Applied Statistics,
    Volume 27, Number 1, 1978, pages 97-99.

Source Code:

Last revised on 28 August 2021.