************80
! LGAMA computes the gamma function or its logarithm.
Licensing:
This routine is copyrighted by Shanjie Zhang and Jianming Jin. However,
they give permission to incorporate this routine into a user program
provided that the copyright is acknowledged.
Modified:
15 July 2012
Author:
Shanjie Zhang, Jianming Jin
Reference:
Shanjie Zhang, Jianming Jin,
Computation of Special Functions,
Wiley, 1996,
ISBN: 0-471-11963-6,
LC: QA351.C45.
Parameters:
Input, integer ( kind = 4 ) KF, the argument code.
1, for gamma(x);
2, for ln(gamma(x)).
Input, real ( kind = 8 ) X, the argument.
Output, real ( kind = 8 ) GL, the function value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | kf | ||||
real(kind=8) | :: | x | ||||
real(kind=8) | :: | gl |