ASA121 is a FORTRAN77 library, using double precision arithmetic, which evaluates the trigamma function.
ASA121 is Applied Statistics Algorithm 121. Source code for many Applied Statistics Algorithms is available through STATLIB.
ASA103 a FORTRAN77 library which evaluates the digamma function.
ASA121 is also available in a C++ version and a FORTRAN90 version and a MATLAB version.
TEST_VALUES is a FORTRAN90 library which contains sample values for a number of special functions.
You can go up one level to the FORTRAN77 source codes.