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 7b44d07 commit 76929d7Copy full SHA for 76929d7
src/simplify.jl
@@ -39,14 +39,13 @@ function simplify(x;
39
Fixpoint(rewriter)
40
end
41
42
- if simplify_fractions
43
- f = f ∘ (x->has_operation(x, /) ? SymbolicUtils.simplify_fractions(x) : x)
44
- end
45
-
46
- PassThrough(f)(x)
+ x = PassThrough(f)(x)
+ simplify_fractions && has_operation(x, /) ?
+ SymbolicUtils.simplify_fractions(x) : x
47
48
49
-has_operation(x, op) = (istree(x) && operation(x) == op) ||
50
- (istree(x) && any(x->has_operation(x, op), unsorted_arguments(x)))
+has_operation(x, op) = (istree(x) && (operation(x) == op ||
+ any(a->has_operation(a, op),
+ unsorted_arguments(x))))
51
52
Base.@deprecate simplify(x, ctx; kwargs...) simplify(x; rewriter=ctx, kwargs...)
0 commit comments