Skip to content

Commit 83dd375

Browse files
committed
apply arithmetic operations in basic symbolics only if binary
1 parent ba96757 commit 83dd375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ function basic_similarterm(t, f, args, stype; metadata=nothing)
532532
if T === nothing
533533
T = _promote_symtype(f, args)
534534
end
535-
if stype <: Number && (f in (+, *) || (f in (/, ^) && length(args) == 2)) && all(x->symtype(x) <: Number, args)
535+
if stype <: Number && (f in (/, ^, +, *) && length(args) == 2) && all(x->symtype(x) <: Number, args)
536536
res = f(args...)
537537
if res isa Symbolic
538538
@set! res.metadata = metadata

0 commit comments

Comments
 (0)