method

lgamma

v1_9_1_378 - Show latest stable - Class: Math
lgamma(p1)
public

Calculates the logarithmic gamma of x and the sign of gamma of x.

Math.lgamma(x) is same as

Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1

but avoid overflow by Math.gamma(x) for large x.