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

Metadata is lost on construction of Mul #546

Closed
shashi opened this issue Aug 30, 2023 · 1 comment
Closed

Metadata is lost on construction of Mul #546

shashi opened this issue Aug 30, 2023 · 1 comment

Comments

@shashi
Copy link
Member

shashi commented Aug 30, 2023

(and potentially other constructions)

julia> SymbolicUtils.inspect(y)
1 POW metadata=(Sign => Positive,)
2 ├─ SYM(x) metadata=(Sign => AnySign,)
3 └─ 2

julia> SymbolicUtils.inspect(2y)
1 MUL(scalar = 2, powers = (x => 2,))
2 ├─ 2
3 └─ POW
4    ├─ SYM(x) metadata=(Sign => AnySign,)
5    └─ 2

when x is LiteralReal, thanks to #429

julia> SymbolicUtils.inspect(2y)
1 TERM{*}
2 ├─ 2
3 └─ TERM{^} metadata=(Sign => Positive,)
4    ├─ SYM(x) metadata=(Sign => AnySign,)
5    └─ 2

The correct solution is to not canonicalize arguments with metadata.

@shashi
Copy link
Member Author

shashi commented Oct 6, 2023

fixed by #547

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

No branches or pull requests

1 participant