Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Jun 23, 2021
1 parent 658d59b commit cb13231
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions diofant/tests/concrete/test_sums_products.py
Expand Up @@ -3,9 +3,9 @@
from diofant import (And, Catalan, Derivative, E, Eq, EulerGamma, Float,
Function, I, Integer, Integral, KroneckerDelta, Le, Mod,
Ne, Or, Piecewise, Product, Rational, Sum, Symbol,
binomial, cos, exp, factorial, gamma, harmonic, log,
lowergamma, nan, oo, pi, product, simplify, sin, sqrt,
summation, symbols, sympify, zeta)
binomial, cos, exp, factorial, floor, gamma, harmonic,
log, lowergamma, nan, oo, pi, product, simplify, sin,
sqrt, summation, symbols, sympify, zeta)
from diofant.abc import a, b, c, d, k, m, x, y, z
from diofant.concrete.summations import telescopic

Expand Down Expand Up @@ -920,3 +920,10 @@ def test_sympyissue_21557():
assert summation(f2, (k, 1, oo)).simplify() == 2**I/(2 - 2**I)
assert (summation(f2, (k, 1, x)).simplify() ==
2**(-x + I)*(-2**x + 2**(I*x))/(-2 + 2**I))


def test_sympyissue_21651():
a = Sum(floor(2*2**(-n)), (n, 1, 2))
b = floor(2*2**(-1)) + floor(2*2**(-2))

assert a.doit() == b.doit()
1 change: 1 addition & 0 deletions docs/release/notes-0.13.rst
Expand Up @@ -97,3 +97,4 @@ These Sympy issues also were addressed:
* :sympyissue:`9127`: ntheory.AskEvenHandler.Mul is order-dependent
* :sympyissue:`21606`: Notimplemented in simple limit
* :sympyissue:`21641`: Simplify hangs
* :sympyissue:`21651`: doit() method *sometimes* ignores floor and ceiling within Sum

0 comments on commit cb13231

Please sign in to comment.