You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default `*` and `+` operations apply the most basic simplification upon construction of the expression.
152
+
By default `+`, `*` and `^` operations apply the most basic simplification upon construction of the expression.
153
153
154
154
The rules with which the canonical form of `Symbolic{<:Number}` terms are constructed are the next (where `x isa Symbolic` and `c isa Number`)
155
155
156
-
-`0 + x` and `1 * x` always gives `x`
157
-
-`0 * x` always gives `0`,
156
+
-`0 + x`, `1 * x` and `x^1` always gives `x`
157
+
-`0 * x` always gives `0` and `x ^ 0` gives `1`
158
+
-`-x`, `1/x` and `x\1` get transformed into `(-1)*x`, `x^(-1)` and `x^(-1)`.
158
159
- commutativity and associativity over `+` and `*` are assumed. Re-ordering of terms will be done under a [total order](https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/master/src/ordering.jl)
159
-
- sum of `Add`'s are fused
160
-
- product of `Mul`'s are fused
161
160
-`x + ... + x` will be fused into `n*x` with type `Mul`
162
161
-`x * ... * x` will be fused into `x^n` with type `Pow`
162
+
- sum of `Add`'s are fused
163
+
- product of `Mul`'s are fused
163
164
-`c * (c₁x₁ + ... + cₙxₙ)` will be converted into `c*c₁*x₁ + ... + c*cₙ*xₙ`
164
-
-`(x₁^c₁ + ... + xₙ^cₙ)^c` will be converted into `x₁^(c*c₁) + ... + xₙ^(c*cₙ)`
165
-
- any other combinations of expressions will be left the same
165
+
-`(x₁^c₁ * ... * xₙ^cₙ)^c` will be converted into `x₁^(c*c₁) * ... * xₙ^(c*cₙ)`
166
+
- there are come other simplifications on construction that you can check [here](https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/master/src/methods.jl)
0 commit comments