Skip to content

Commit ef9302c

Browse files
committed
wip: restore some branches which ARE compatible with special operators
1 parent 4557455 commit ef9302c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Evaluate.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,17 @@ end
361361
i -> let op = operators.binops[i]
362362
if special_operator(op)
363363
deg2_eval_special(tree, cX, op, eval_options)
364-
elseif !$(special_operators) && tree.l.degree == 0 && tree.r.degree == 0
364+
elseif tree.l.degree == 0 && tree.r.degree == 0
365365
deg2_l0_r0_eval(tree, cX, op, eval_options)
366-
elseif !$(special_operators) && tree.r.degree == 0
366+
elseif tree.r.degree == 0
367367
result_l = _eval_tree_array(tree.l, cX, operators, eval_options)
368368
!result_l.ok && return result_l
369369
@return_on_nonfinite_array(eval_options, result_l.x)
370370
# op(x, y), where y is a constant or variable but x is not.
371371
deg2_r0_eval(tree, result_l.x, cX, op, eval_options)
372372
elseif !$(special_operators) && tree.l.degree == 0
373+
# This branch changes the execution order, so we cannot
374+
# use this branch when special operators are present.
373375
result_r = _eval_tree_array(tree.r, cX, operators, eval_options)
374376
!result_r.ok && return result_r
375377
@return_on_nonfinite_array(eval_options, result_r.x)

0 commit comments

Comments
 (0)