We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5b4d8f commit 66e8253Copy full SHA for 66e8253
test/rewrite.jl
@@ -98,6 +98,15 @@ end
98
@test r_mix((a + b*c)^2) === (2, c)
99
@test r_mix((a + b*c)) === (1, c)
100
@test r_mix((a + b)) === (1, 1)
101
+
102
+ r_more_than_two_arguments = @rule (~!a)*exp(~x)*sin(~x) => (~a, ~x)
103
+ @test r_more_than_two_arguments(sin(x)*exp(x)) === (1, x)
104
+ @test r_more_than_two_arguments(sin(x)*exp(x)*a) === (a, x)
105
106
+ r_mixmix = @rule (~!a)*exp(~x)*sin(~!b + (~x)^2 + ~x) => (~a, ~b, ~x)
107
+ @test r_mixmix(exp(x)*sin(1+x+x^2)*2) === (2, 1, x)
108
+ @test r_mixmix(exp(x)*sin(x+x^2)*2) === (2, 0, x)
109
+ @test r_mixmix(exp(x)*sin(x+x^2)) === (1, 0, x)
110
end
111
112
@testset "1/power matches power with exponent of opposite sign" begin
0 commit comments