本文整理汇总了Python中sympy.digamma函数的典型用法代码示例。如果您正苦于以下问题:Python digamma函数的具体用法?Python digamma怎么用?Python digamma使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了digamma函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_gruntz_eval_special_slow
def test_gruntz_eval_special_slow():
sskip()
assert gruntz(gamma(x+1)/sqrt(2*pi)
- exp(-x)*(x**(x+S(1)/2) + x**(x-S(1)/2)/12), x, oo) == oo
assert gruntz(exp(exp(exp(digamma(digamma(digamma(x))))))/x, x, oo) == 0
# XXX This sometimes fails!!!
assert gruntz(exp(gamma(x-exp(-x))*exp(1/x)) - exp(gamma(x)), x, oo) == oo
开发者ID:101man,项目名称:sympy,代码行数:7,代码来源:test_gruntz.py
示例2: test_beta
def test_beta():
x, y = Symbol('x'), Symbol('y')
assert isinstance(beta(x, y), beta)
assert expand_func(beta(x, y)) == gamma(x)*gamma(y)/gamma(x + y)
assert expand_func(beta(x, y) - beta(y, x)) == 0 # Symmetric
assert expand_func(beta(x, y)) == expand_func(beta(x, y + 1) + beta(x + 1, y)).simplify()
assert diff(beta(x, y), x) == beta(x, y)*(digamma(x) - digamma(x + y))
assert diff(beta(x, y), y) == beta(x, y)*(digamma(y) - digamma(x + y))
开发者ID:A-turing-machine,项目名称:sympy,代码行数:11,代码来源:test_beta_functions.py
示例3: test_gruntz_eval_special
def test_gruntz_eval_special():
# Gruntz, p. 126
assert gruntz(exp(x) * (sin(1 / x + exp(-x)) - sin(1 / x + exp(-x ** 2))), x, oo) == 1
assert gruntz((erf(x - exp(-exp(x))) - erf(x)) * exp(exp(x)) * exp(x ** 2), x, oo) == -2 / sqrt(pi)
assert gruntz(exp(exp(x)) * (exp(sin(1 / x + exp(-exp(x)))) - exp(sin(1 / x))), x, oo) == 1
assert gruntz(exp(x) * (gamma(x + exp(-x)) - gamma(x)), x, oo) == oo
assert gruntz(exp(exp(digamma(digamma(x)))) / x, x, oo) == exp(-S(1) / 2)
assert gruntz(exp(exp(digamma(log(x)))) / x, x, oo) == exp(-S(1) / 2)
assert gruntz(digamma(digamma(digamma(x))), x, oo) == oo
assert gruntz(loggamma(loggamma(x)), x, oo) == oo
assert gruntz(((gamma(x + 1 / gamma(x)) - gamma(x)) / log(x) - cos(1 / x)) * x * log(x), x, oo) == -S(1) / 2
assert gruntz(x * (gamma(x - 1 / gamma(x)) - gamma(x) + log(x)), x, oo) == S(1) / 2
assert gruntz((gamma(x + 1 / gamma(x)) - gamma(x)) / log(x), x, oo) == 1
开发者ID:Carreau,项目名称:sympy,代码行数:13,代码来源:test_gruntz.py
示例4: test_leading_term
def test_leading_term():
from sympy import digamma
assert O(1 / digamma(1 / x)) == O(1 / log(x))
开发者ID:smichr,项目名称:sympy,代码行数:4,代码来源:test_order.py
示例5: test_gruntz_eval_special_slow
def test_gruntz_eval_special_slow():
_sskip()
assert gruntz(gamma(x + 1)/sqrt(2*pi)
- exp(-x)*(x**(x + S(1)/2) + x**(x - S(1)/2)/12), x, oo) == oo
assert gruntz(exp(exp(exp(digamma(digamma(digamma(x))))))/x, x, oo) == 0
开发者ID:agamdua,项目名称:sympy,代码行数:5,代码来源:test_gruntz.py
注:本文中的sympy.digamma函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论