# loggamma


gamma函数的对数

函数库: TyMath

# 语法

Y = loggamma(x)
Y = loggamma(a,x)

# 说明

Y = loggamma(x) 返回 gamma 函数的对数 loggamma(x) = log(gamma(x))。loggamma 命令可避免直接使用 log(gamma(x)) 计算时可能会出现的下溢和上溢。 示例


Y = loggamma(a,x) 返回 gamma 函数的对数 loggamma(a,x) = log(gamma(a,x))。

详细信息请参阅gamma

# 示例

计算gamma函数的自然函数

计算 gamma 函数的自然对数

using TyMath
x = 3.5
y1 = log(gamma(x))
y2 = loggamma(x)
y1 == y2
ans = true

# 参考

[1] Cody, J., An Overview of Software Development for Special Functions, Lecture Notes in Mathematics, 506, Numerical Analysis Dundee, G. A. Watson (ed.), Springer Verlag, Berlin, 1976.

[2] Abramowitz, M. and I.A. Stegun, Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series #55, Dover Publications, 1965, sec. 6.5.

# 另请参阅

gamma | gamma_inc | gamma_inc_inv