示例#1
0
def test_log_to_atan():
    f, g = (Poly(x + S(1)/2, x, domain='QQ'), Poly(sqrt(3)/2, x, domain='EX'))
    fg_ans = 2*atan(2*sqrt(3)*x/3 + sqrt(3)/3)
    assert log_to_atan(f, g) == fg_ans
    assert log_to_atan(g, f) == -fg_ans
def test_log_to_atan():
    f, g = (Poly(x + S(1) / 2, x,
                 domain='QQ'), Poly(sqrt(3) / 2, x, domain='EX'))
    fg_ans = 2 * atan(2 * sqrt(3) * x / 3 + sqrt(3) / 3)
    assert log_to_atan(f, g) == fg_ans
    assert log_to_atan(g, f) == -fg_ans
示例#3
0
def test_log_to_atan():
    f, g = (Poly(x + S.Half, x, domain="QQ"), Poly(sqrt(3) / 2, x, domain="EX"))
    fg_ans = 2 * atan(2 * sqrt(3) * x / 3 + sqrt(3) / 3)
    assert log_to_atan(f, g) == fg_ans
    assert log_to_atan(g, f) == -fg_ans