Flowdock
method

lgamma

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - 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.

Show source
Register or log in to add new notes.