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
Added negative support for acos, asin #26542
base: master
Are you sure you want to change the base?
Conversation
acos(-cos(x)) after simplify(..., inverse=True) fails to simplify to pi - x.
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13. Click here to see the pull request description that was parsed.
|
g = getattr(rv, 'inverse', None) | ||
if isinstance(rv, asin): | ||
x = rv.args[0] | ||
if _coeff_isneg(x): | ||
print(x.args) | ||
return -f(x.args[1].args[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not check whether the argument is a sin function.
Also print should not be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix it when I'm back
acos(-cos(x)) after simplify(..., inverse=True) fails to simplify to pi - x.
References to other Issues or PRs
Brief description of what is fixed or changed
Other comments
Release Notes
acos(-cos(x))
does not simplify topi - x
,asin(-sin(x))
does not simplify to -x. (This fix only applies to the inverse=True flag)