MCPcopy Index your code
hub / github.com/clips/pattern / gammaln

Function gammaln

pattern/metrics.py:815–825  ·  view source on GitHub ↗

Returns the logarithm of the gamma function.

(x)

Source from the content-addressed store, hash-verified

813# See also: http://www.mhtl.uwaterloo.ca/courses/me755/web_chap1.pdf
814
815def gammaln(x):
816 """ Returns the logarithm of the gamma function.
817 """
818 x = x - 1.0
819 y = x + 5.5
820 y = (x + 0.5) * log(y) - y
821 n = 1.0
822 for i in range(6):
823 x += 1
824 n += (76.18009173, -86.50532033, 24.01409822, -1.231739516e0, 0.120858003e-2, -0.536382e-5)[i] / x
825 return y + log(2.50662827465 * n)
826
827def gamma(x):
828 return exp(gammaln(x))

Callers 3

gammaFunction · 0.85
gsFunction · 0.85
gfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…