Home >>Python math Module >Python math.lgamma() Method

Python math.lgamma() Method

Python math.lgamma() Method

Python math.lgamma() method is used to return the log gamma value of the given input number. The gamma value is equal to the value of factorial(x-1).

Syntax:
math.lgamma(x)

Parameter Values

Parameter Description
x This is a required parameter. It defines the number to find the log gamma value of.
Here is an example of Python math.lgamma() method:

import math
print (math.lgamma(5))
print (math.lgamma(-9.2))

Output:
3.178053830347945
-11.578143243404924