Here is stand-alone C# code for the functions Gamma
and LogGamma
. Both require a positive argument.
Why are there separate functions for gamma and its logarithm? See this post for an explanation.
Note that the functions Gamma
and LogGamma
are mutually dependent, but do not depend on anything else.