toms291, a C code which approximates the logarithm of the Gamma function.
The text of many ACM TOMS algorithms is available online through ACM: https://calgo.acm.org/ or NETLIB: https://www.netlib.org/toms/index.html.
The information on this web page is distributed under the MIT license.
toms291 is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version.
polpak, a C code which evaluates a variety of special functions.
test_values, a C code which tabulates several values of a variety of special functions.