gammaln

gammaln(X) calculates logarithm of gamma function for each element of X.