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

Fixed the false SYMENGINE_ASSERT. #1904

Closed
wants to merge 1 commit into from
Closed

Fixed the false SYMENGINE_ASSERT. #1904

wants to merge 1 commit into from

Conversation

wermos
Copy link

@wermos wermos commented Apr 14, 2022

Fixes #1875.

I removed the unnecessary check for whether the *num == *den in is_canonical. All the existing tests still pass without it.

@isuruf
Copy link
Member

isuruf commented Apr 14, 2022

I think we should fix #1808 instead of removing this assert.

@wermos
Copy link
Author

wermos commented Apr 14, 2022

Hi, thanks for the quick reply. I noticed #1808 after making this PR. You are right, I should probably continue the work on the #1808 branch instead of creating this new one.

However, I have a couple of questions: Why are the checks that is_canonical() performs necessary? What happens if the numerator is equal to the denominator? Also, what exactly does the inverse_tct function do?

@isuruf
Copy link
Member

isuruf commented Apr 16, 2022

Why are the checks that is_canonical() performs necessary? What happens if the numerator is equal to the denominator?

If numerator == denominator, then it should be pi/2*sign(numerator) and not an ATan instance.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SYMENGINE_ASSERT triggered when substituting value in atan2 expression
2 participants