Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Simplification bug on alternating series. #10195
from sympy import * n = Symbol('n', odd=true, nonzero=true) x = (-1)**(n/2 - Rational(1,2)) - (-1)**(3*n/2 - Rational(1,2)) print( x.subs(n,1)) # 2 print( x.subs(n,3)) # -2 print( x.subs(n,5)) # 2 print(simplify(x)) # -> 2 bug
I think this should be considered a bug.