Skip to content
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

Misc no-cache fixes #78

Merged
merged 3 commits into from
Oct 2, 2015
Merged

Misc no-cache fixes #78

merged 3 commits into from
Oct 2, 2015

Conversation

skirpichev
Copy link
Member

@skirpichev skirpichev added bug an unexpected problem or unintended behavior core caching labels May 9, 2015
@skirpichev skirpichev force-pushed the no-cache-fixes branch 2 times, most recently from ba7e730 to 63dc189 Compare June 6, 2015 08:50
@skirpichev skirpichev mentioned this pull request Jul 1, 2015
88 tasks
mcho421 and others added 2 commits October 2, 2015 13:46
This can handle seeing one arg which is_positive/is_negative=False. If
there's more than one is_positive/is_negative=False arg, all bets are
off. It becomes a multiplication between non-reals. The result of the
Mul could then be positive, negative, not real etc. This is why I count
the number of is_positive/is_negative=False args.

This is also one of the changes needed to fix the infinite recursion bug
when the cache is turned off. The (-self).is_positive call actually has
side effects that causes Mul._eval_is_negative to perform these
is_positive/is_negative = False checks for some reason (without this
commit). This is why I explicitly add it to the _eval_is_positive case.

Example:
mx = -Symbol('x', negative=False)
assert mx.is_positive is False  # will pass now

px = 2*Symbol('x', positive=False)
assert px.is_positive is False  # will pass now
Refactor some assumptions helpers for Mul to reduce circularity.
Fixes sympy/sympy#8840, fixes sympy/sympy#9413, fixes sin(x + x).
skirpichev added a commit that referenced this pull request Oct 2, 2015
@skirpichev skirpichev merged commit dd0715a into master Oct 2, 2015
@skirpichev skirpichev deleted the no-cache-fixes branch October 2, 2015 18:40
@skirpichev skirpichev modified the milestone: 0.8.0 Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior caching core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants