Log Gamma Function lnΓ(x) Calculator
Compute the log gamma function lnΓ(x) for any real x using the Lanczos approximation. It also reports the value and sign of Γ(x) and handles negative non-integers via the reflection formula.
Input
Enter a real number x to compute the log gamma function lnΓ(x) using the Lanczos approximation. The value and sign of Γ(x) are shown as well.
Any real number. Zero and negative integers are poles and cannot be evaluated.
Result
lnΓ(4.5)
2.4537365708
Gamma function Γ(x)
11.6317284
Sign of Γ(x)
Positive (+)
Graph of lnΓ(x)
Showing ln|Γ(x)| over the interval [−4.5, 6]. The orange dot marks the current x.
How it works
- lnΓ(x) is evaluated with the Lanczos approximation (g=7). Returning the logarithm of the factorial directly lets you handle large arguments without overflowing Γ(x).
- For x below 0.5 the reflection formula Γ(x)Γ(1-x) = π / sin(π x) folds the argument before evaluation, so negative non-integers are supported.
- Where Γ(x) is negative, lnΓ(x) is returned as ln|Γ(x)| with the sign reported separately. Zero and negative integers are poles of Γ and are undefined.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Log Gamma Function lnΓ(x) Calculator