コード例 #1
0
ファイル: test_rootoftools.py プロジェクト: Bercio/sympy
def test_RootOf_evalf_caching_bug():
    r = RootOf(x**5 - 5*x + 12, 1)
    r.n()
    a = r._get_interval()
    r = RootOf(x**5 - 5*x + 12, 1)
    r.n()
    b = r._get_interval()
    assert a == b
コード例 #2
0
def test_CRootOf_evalf_caching_bug():
    r = rootof(x**5 - 5 * x + 12, 1)
    r.n()
    a = r._get_interval()
    r = rootof(x**5 - 5 * x + 12, 1)
    r.n()
    b = r._get_interval()
    assert a == b
コード例 #3
0
def test_RootOf_is_imaginary():
    r = RootOf(x**4 + 4 * x**2 + 1, 1)
    i = r._get_interval()
    assert r.is_imaginary and i.ax * i.bx <= 0
コード例 #4
0
ファイル: test_rootoftools.py プロジェクト: cmarqu/sympy
def test_RootOf_is_imaginary():
    r = RootOf(x**4 + 4*x**2 + 1, 1)
    i = r._get_interval()
    assert r.is_imaginary and i.ax*i.bx <= 0