@@ -128,7 +128,7 @@ function mul_numeric_args(args)
128
128
(prod, sym_args)
129
129
end
130
130
131
- # Handles all lengths for ex.args
131
+ # Handles `args` of all lengths
132
132
# Removes any 0's in a sum
133
133
function simplify (:: SymbolParameter{:+} , args)
134
134
new_args = map (x -> simplify (x), filter (x -> x != 0 , args))
@@ -144,7 +144,7 @@ function simplify(::SymbolParameter{:+}, args)
144
144
end
145
145
end
146
146
147
- # Assumes length(ex. args) == 3
147
+ # Assumes length(args) == 3
148
148
# Removes any 0's in a subtraction
149
149
function simplify (:: SymbolParameter{:-} , args)
150
150
new_args = map (x -> simplify (x), filter (x -> x != 0 , args))
@@ -158,13 +158,13 @@ function simplify(::SymbolParameter{:-}, args)
158
158
end
159
159
end
160
160
161
- # Handles all lengths for ex.args
161
+ # Handles `args` of all lengths
162
162
# Removes any 1's in a product
163
163
function simplify (:: SymbolParameter{:*} , args)
164
164
new_args = map (x -> simplify (x), filter (x -> x != 1 , args))
165
165
if length (new_args) == 0
166
166
return 1
167
- # Special Case: simplify(:(*x )) == x
167
+ # Special Case: simplify(:(*(x) )) == x
168
168
elseif length (new_args) == 1
169
169
return new_args[1 ]
170
170
# Special Case: simplify(:(x * y * z * 0)) == 0
@@ -177,7 +177,7 @@ function simplify(::SymbolParameter{:*}, args)
177
177
end
178
178
end
179
179
180
- # Assumes length(ex. args) == 3
180
+ # Assumes length(args) == 3
181
181
function simplify (:: SymbolParameter{:/} , args)
182
182
new_args = map (x -> simplify (x), args)
183
183
# Special Case: simplify(:(x / 1)) == x
@@ -191,7 +191,7 @@ function simplify(::SymbolParameter{:/}, args)
191
191
end
192
192
end
193
193
194
- # Assumes length(ex. args) == 3
194
+ # Assumes length(args) == 3
195
195
function simplify (:: SymbolParameter{:^} , args)
196
196
new_args = map (x -> simplify (x), args)
197
197
# Special Case: simplify(:(x ^ 0)) == 1
0 commit comments