-
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
Documentation on re-writing does not behave as expected #420
Comments
The doc over here should probably be updated |
Hi! Can it be resolved? |
This might be related |
This seems to have been fixed at some point, at least for me on 3.7 it gives the documented output: julia> using SymbolicUtils
julia> @syms w z α::Real β::Real
(w, z, α, β)
julia> r1 = @rule sin(2(~x)) => 2sin(~x)*cos(~x)
sin(2 * ~x) => (2 * sin(~x)) * cos(~x)
julia> r1(sin(2*(w-z)))
2cos(w - z)*sin(w - z)
julia> r3 = @rule ~x * +(~~ys) => sum(map(y-> ~x * y, ~~ys));
julia> r3(2 * (w+w+α+β))
4w + 2α + 2β |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I walked through the documentation here
r1(sin(2*(w-z)))
does not match andr3 = @rule ~x * +(~~ys) => sum(map(y-> ~x * y, ~~ys)); r3(2 * (w+w+α+β))
does not match. I switched over to Metatheory.jl and it seems to work perfectly though.The text was updated successfully, but these errors were encountered: