-
Notifications
You must be signed in to change notification settings - Fork 116
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
Simplifying a/a #388
Comments
We could have nonzero(x::Symbolic) = getmetadata(x, SignAnalysis) != 0 and nonzero(g::EGraph, x::EClass) = let sign Metatheory.getdata(x, SignAnalysis, nothing)
sign != 0 && !isnothing(sign)
end (same goes for |
Now using SymbolicUtils
@syms a
simplify(a/a) gives 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simplification of a simple division
a/a
is currently not performed by the package.I am aware of the special cases where
a = 0
ora = ∞
but these could be avoided if we attach metadata (e.g.nonzero
) to the variable. There was a small discussion on metadata in JuliaSymbolics/Symbolics.jl#351 (comment)PS. Should we have a documented set of metadata (potentially) handled by the package? I cannot find any documentation on this.
The text was updated successfully, but these errors were encountered: