本文整理汇总了Python中sympy.series.gruntz.mrv函数的典型用法代码示例。如果您正苦于以下问题:Python mrv函数的具体用法?Python mrv怎么用?Python mrv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mrv函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_rewrite1
def test_rewrite1():
e = exp(x)
assert mrewrite(mrv(e, x), x, m) == (1/m, -x)
e = exp(x**2)
assert mrewrite(mrv(e, x), x, m) == (1/m, -x**2)
e = exp(x + 1/x)
assert mrewrite(mrv(e, x), x, m) == (1/m, -x - 1/x)
e = 1/exp(-x + exp(-x)) - exp(x)
assert mrewrite(mrv(e, x), x, m) == (1/(m*exp(m)) - 1/m, -x)
开发者ID:agamdua,项目名称:sympy,代码行数:9,代码来源:test_gruntz.py
示例2: test_mrv1
def test_mrv1():
assert mrv(x, x) == set([x])
assert mrv(x+1/x, x) == set([x])
assert mrv(x**2, x) == set([x])
assert mrv(log(x), x) == set([x])
assert mrv(exp(x), x) == set([exp(x)])
assert mrv(exp(-x), x) == set([exp(-x)])
assert mrv(exp(x**2), x) == set([exp(x**2)])
assert mrv(-exp(1/x), x) == set([x])
assert mrv(exp(x+1/x), x) == set([exp(x+1/x)])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:10,代码来源:test_gruntz.py
示例3: test_rewrite3
def test_rewrite3():
e = exp(-x + 1 / x ** 2) - exp(x + 1 / x)
# both of these are correct and should be equivalent:
assert mrewrite(mrv(e, x), x, m) in [
(-1 / m + m * exp(1 / x + 1 / x ** 2), -x - 1 / x),
(m - 1 / m * exp(1 / x + x ** (-2)), x ** (-2) - x),
]
开发者ID:Carreau,项目名称:sympy,代码行数:7,代码来源:test_gruntz.py
示例4: test_mrv3
def test_mrv3():
assert mrv(exp(x**2)+x*exp(x)+log(x)**x/x, x) == set([exp(x**2)])
assert mrv(exp(x)*(exp(1/x+exp(-x))-exp(1/x)), x) == set([exp(x), exp(-x)])
assert mrv(log(x**2+2*exp(exp(3*x**3*log(x)))), x) == set([exp(exp(3*x**3*log(x)))])
assert mrv(log(x-log(x))/log(x), x) == set([x])
assert mrv((exp(1/x-exp(-x))-exp(1/x))*exp(x), x) == set([exp(x), exp(-x)])
assert mrv(1/exp(-x+exp(-x))-exp(x), x) == set([exp(x), exp(-x), exp(x-exp(-x))])
assert mrv(log(log(x*exp(x*exp(x))+1)), x) == set([exp(x*exp(x))])
assert mrv(exp(exp(log(log(x)+1/x))), x) == set([x])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:9,代码来源:test_gruntz.py
示例5: test_MrvTestCase_page47_ex3_21
def test_MrvTestCase_page47_ex3_21():
h = exp(-x/(1 + exp(-x)))
expr = exp(h)*exp(-x/(1 + h))*exp(exp(-x + h))/h**2 - exp(x) + x
expected = set([1/h, exp(x), exp(x - h), exp(x/(1 + h))])
# XXX Incorrect result
assert mrv(expr, x).difference(expected) == set()
开发者ID:agamdua,项目名称:sympy,代码行数:6,代码来源:test_gruntz.py
示例6: test_rewrite2
def test_rewrite2():
e = exp(x)*log(log(exp(x)))
assert mmrv(e, x) == set([exp(x)])
assert mrewrite(mrv(e, x), x, m) == (1/m*log(x), -x)
开发者ID:agamdua,项目名称:sympy,代码行数:4,代码来源:test_gruntz.py
示例7: mmrv
def mmrv(a, b):
return set(mrv(a, b)[0].keys())
开发者ID:agamdua,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
示例8: mmrv
def mmrv(a, b): return set(mrv(a, b)[0].keys())
def test_mrv1():
开发者ID:greensnake,项目名称:sympy,代码行数:3,代码来源:test_gruntz.py
示例9: test_mrv2a
def test_mrv2a():
assert mrv(exp(x+exp(-exp(x))), x) == set([exp(-exp(x))])
assert mrv(exp(x+exp(-x)), x) == set([exp(x+exp(-x)), exp(-x)])
assert mrv(exp(1/x+exp(-x)), x) == set([exp(-x)])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:4,代码来源:test_gruntz.py
示例10: test_mrv_leadterm3
def test_mrv_leadterm3():
#Gruntz: p56, 3.27
assert mrv(exp(-x+exp(-x)*exp(-x*log(x))), x) == set([exp(-x-x*log(x))])
assert mrv_leadterm(exp(-x+exp(-x)*exp(-x*log(x))), x) == (exp(-x), 0)
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:4,代码来源:test_gruntz.py
示例11: test_mrv4
def test_mrv4():
ln = log
assert mrv((ln(ln(x)+ln(ln(x)))-ln(ln(x)))/ln(ln(x)+ln(ln(ln(x))))*ln(x),
x) == set([x])
assert mrv(log(log(x*exp(x*exp(x))+1)) - exp(exp(log(log(x)+1/x))), x) == \
set([exp(x*exp(x))])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:6,代码来源:test_gruntz.py
示例12: test_mrv2c
def test_mrv2c():
assert mrv(exp(-x+1/x**2)-exp(x+1/x), x) == set([exp(x+1/x), exp(1/x**2-x)])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
示例13: test_mrv2b
def test_mrv2b():
assert mrv(exp(x+exp(-x**2)), x) == set([exp(-x**2)])
开发者ID:KevinGoodsell,项目名称:sympy,代码行数:2,代码来源:test_gruntz.py
注:本文中的sympy.series.gruntz.mrv函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论