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
similarterm hard-code the resulting Symbolic subtype according to the input operation f. For example, when f is *, similarterm calls Mul no matter what the input args are.
I guess so. The set of Symbolic arithmetic operations are well defined. It seems unnecessary to manually define new rules for the resultant types and data structures in similarterm.
similarterm
hard-code the resultingSymbolic
subtype according to the input operationf
. For example, whenf
is*
,similarterm
callsMul
no matter what the inputargs
are.SymbolicUtils.jl/src/types.jl
Lines 529 to 549 in 97a8a86
However, the result's type is not necessarily
Mul
for the*
operations defined insrc/types.jl
.SymbolicUtils.jl/src/types.jl
Lines 1121 to 1162 in 97a8a86
See the following test case.
The result of the normal
*
operation isAdd(coeff = 0, dict = Dict(x => -1, y => -1)
.The result of
similarterm
isMul(coeff = -1, dict = Dict(Add(coeff = 0, dict = Dict(x => 1, y => 1)) => 1)
.The text was updated successfully, but these errors were encountered: