New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doit() method *sometimes* ignores floor and ceiling within Sum #21651
Labels
Comments
rajkk1
changed the title
doit() method ignores floor and ceiling within Sum
doit() method *sometimes* ignores floor and ceiling within Sum
Jun 22, 2021
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Jun 23, 2021
The problem arises since
returns (Summation replaces the original variable with a dummy variable with additional assumptions, such as integer, and in this case, positive.) |
This doesn't happen for the equivalent |
oscargus
added a commit
to oscargus/sympy
that referenced
this issue
Aug 22, 2021
smichr
added a commit
that referenced
this issue
Aug 24, 2021
Fixed issue with determining is_integer for round functions (#21651)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of problem: the
doit()
method will sometimes (depending on the expression) ignore anyfloor
orceiling
that is located inside aSum
.Example detailing the bug
The following code sets up the problem:
Note that these two expressions
a
andb
are the same, justa
is written with the summation notation andb
is written out explicitly. They both equal1
.Printing these variables give us the expected results:
However, if we run the
doit()
method on them we see a discrepancy:where we see that the
floor
function inside the summation has been ignored. The same issue also arises when using theceiling
method (i.e. thedoit()
method ignores it when it is in a summation).However it seems like this problem is not consistent, e.g. if you remove the
2*
from the expression it works fine. More precisely if you runyou get the exptected results (this works for
ceiling
too)(bug discovered on sympy version 1.8 on python 3.7.3)
The text was updated successfully, but these errors were encountered: