[graph lgamma]
-There are effectively two versions of this function internally: a fully
-generic version that is slow, but reasonably accurate, and a much more
-efficient approximation that is used where the number of digits in the significand
-of T correspond to a certain __lanczos. In practice, any built-in
-floating-point type you will encounter has an appropriate __lanczos
-defined for it. It is also possible, given enough machine time, to generate
-further __lanczos's using the program libs/math/tools/lanczos_generator.cpp.
-
The return type of these functions is computed using the __arg_promotion_rules:
the result is of type `double` if T is an integer type, or type T otherwise.
[equation lgamm4]
-Where L[sub e,g][space] is the Lanczos sum, scaled by e[super g].
+Where L[sub e,g] is the Lanczos sum, scaled by e[super g].
As before the reflection formula is used for /z < 0/.
lgamma(z) = (z-2)(z+1)(Y + R(z-2));
Where Y is a constant, and R(z-2) is the rational approximation: optimised
-so that it's absolute error is tiny compared to Y. In addition
-small values of z greater
+so that its absolute error is tiny compared to Y. In addition, small values of z greater
than 3 can handled by argument reduction using the recurrence relation:
lgamma(z+1) = log(z) + lgamma(z);
[equation lgamm5]
-The C[sub k][space] terms in the above are the same as in the __lanczos.
+The C[sub k] terms in the above are the same as in the __lanczos.
A similar rearrangement can be performed at /z = 2/:
[equation lgamm6]
-[endsect][/section:lgamma The Log Gamma Function]
+[endsect] [/section:lgamma The Log Gamma Function]
[/
Copyright 2006 John Maddock and Paul A. Bristow.