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

CSE does not perform nested nested eliminations of repeated expressions #568

Open
cdsousa opened this issue Dec 16, 2023 · 0 comments · May be fixed by #593
Open

CSE does not perform nested nested eliminations of repeated expressions #568

cdsousa opened this issue Dec 16, 2023 · 0 comments · May be fixed by #593

Comments

@cdsousa
Copy link

cdsousa commented Dec 16, 2023

Example:

using Symbolics
@variables x y
e = (x*y) + sin(x*y) + sqrt(sin(x*y))
Symbolics.cse(e)

returns an intermediate variable for x*y and another for sin(x*y).
It would be expected that the second variable includes the first one in the argument of sin rather than a repeated x*y.

This was working OK before the commit "CSE only exprs that appear more than once" 2c60e25
The previous behavior, while suboptimal, is much preferable for the effect of code optimization.

@spcornelius spcornelius linked a pull request May 3, 2024 that will close this issue
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.

1 participant