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

Simplify + and * on construction when the type is commutative and associative #151

Closed
YingboMa opened this issue Dec 21, 2020 · 2 comments · Fixed by #154
Closed

Simplify + and * on construction when the type is commutative and associative #151

YingboMa opened this issue Dec 21, 2020 · 2 comments · Fixed by #154

Comments

@YingboMa
Copy link
Member

See https://github.com/symengine/symengine/blob/master/doc/design.md#object-creation-and-is_canonical

It is way faster than what we are doing now.

@shashi
Copy link
Member

shashi commented Dec 21, 2020

Okay I'm down to do this now. I avoided it initially because the rules just used stuff like ~a + ~b on the RHS and that would again trigger canonicalization, now we use similarterm(+, ~a, ~b) so we should be good.

@shashi
Copy link
Member

shashi commented Jan 8, 2021

OK we need to restrict #154 to only when types are associative commutative. Also, promote the output types properly.

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 a pull request may close this issue.

2 participants