예제 #1
0
파일: test_gosper.py 프로젝트: msgoff/sympy
def test_gosper_normal():
    eq = 4 * n + 5, 2 * (4 * n + 1) * (2 * n + 3), n
    assert gosper_normal(*eq) == (
        Poly(Rational(1, 4), n),
        Poly(n + Rational(3, 2)),
        Poly(n + Rational(1, 4)),
    )
    assert gosper_normal(*eq, polys=False) == (
        Rational(1, 4),
        n + Rational(3, 2),
        n + Rational(1, 4),
    )
예제 #2
0
def test_gosper_normal():
    assert gosper_normal(4*n + 5, 2*(4*n + 1)*(2*n + 3), n) == \
        (Poly(S(1)/4, n), Poly(n + S(3)/2), Poly(n + S(1)/4))
예제 #3
0
def test_gosper_normal():
    assert gosper_normal(4*n + 5, 2*(4*n + 1)*(2*n + 3), n) == \
        (Poly(S(1)/4, n), Poly(n + S(3)/2), Poly(n + S(1)/4))
def test_gosper_normal():
    eq = 4 * n + 5, 2 * (4 * n + 1) * (2 * n + 3), n
    assert gosper_normal(*eq) == \
        (Poly(S(1)/4, n), Poly(n + S(3)/2), Poly(n + S(1)/4))
    assert gosper_normal(*eq, polys=False) == \
        (S(1)/4, n + S(3)/2, n + S(1)/4)
예제 #5
0
from sympy import S
from sympy import *
from sympy.concrete.gosper import gosper_sum, gosper_normal
from sympy.functions import factorial
from sympy.abc import z, n

f1 = z**2 / ((z - 1) * (z - 0.5))
F1_z = gosper_normal(f1, (z, 0, S.Infinity))

print(F1_z)