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
Fix for Mul.is_real #16357
Merged
Merged
Fix for Mul.is_real #16357
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Hi, I am the SymPy bot (v142). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.
Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Click here to see the pull request description that was parsed.
|
Can you add a unit test? |
@jksuom I added tests. |
Thanks, looks ok. |
Thanks @jksuom |
Please include release notes entries in the future. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References to other Issues or PRs
Fixes #16313
Brief description of what is fixed or changed
Consider the following code:
Apparently the negation of a non-real should be non-real but I still don't know what non-real numbers do sympy support and what symbols with
real=False
could imply.Are there any non-real numbers when multiplied by -1 produces real numbers?
But by understanding the code in
sympy.core.Mul.is_eval_real_imag()
, I could infer that sincecomplex = None
would mean eithercomplex=True
orcomplex=False
in both of these cases the present code was giving resultFalse
withreal=False
. So the desired result is alsoFalse
.Other comments
Release Notes
NO ENTRY