File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,15 @@ If you are a Julia package develper in need of a rule rewriting system for your
2525``` julia
2626julia> using SymbolicUtils
2727
28- julia> @syms x:: Real y:: Real z:: Complex
28+ julia> @syms x:: Real y:: Real z:: Complex f ( :: Number ) :: Real
2929(x, y, z)
3030
3131julia> 2 x^ 2 - y + x^ 2
3232(3 * (x ^ 2 )) + (- 1 * y)
3333
34+ julia> f (sin (x)^ 2 + cos (x)^ 2 ) + z
35+ f (1 ) + z
36+
3437julia> r = @rule sinh (im * ~ x) => sin (~ x)
3538sinh (im * ~ x) => sin (~ x)
3639
Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ function fuzz_test(ntrials)
100100end
101101
102102using Random: seed!
103- seed! (6174 )
104103
105104@testset " Fuzz test" begin
106105
106+ seed! (6174 )
107107 for i= 1 : 2000
108108 fuzz_test (10 )
109109 end
Original file line number Diff line number Diff line change 11using Random: shuffle, seed!
22
3- seed! (1729 )
4-
53@testset " Numeric" begin
64 @syms a:: Integer b c d x:: Real y:: Number
75 @test simplify (x - y) == x + - 1 * y
7169@testset " Shuffle Rules" begin
7270 @syms a:: Integer b c d x:: Real y:: Number
7371 R1 = RuleSet (SymbolicUtils. SIMPLIFY_RULES)
72+
73+ seed! (1729 )
7474 R2 = RuleSet (shuffle (R1. rules))
7575 simplify_shuffle_tester (ex) = (R2 ∘ R1)(ex) == (R1 ∘ R2)(ex)
7676
You can’t perform that action at this time.
0 commit comments