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.
153
153
154
-
Commutativity and associativity are assumed over `+` and `*` operations on `Symbolic{<:Number}`.
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
+
156
+
-`0 + x` and `1 * x` always gives `x`
157
+
-`0 * x` always gives `0`,
158
+
- 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
+
-`x + ... + x` will be fused into `n*x` with type `Mul`
162
+
-`x * ... * x` will be fused into `x^n` with type `Pow`
163
+
-`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
0 commit comments