Skip to content

Commit

Permalink
Simplify trivial ifelse cases. Fix JuliaSymbolics/Symbolics.jl#170
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar-Elrefaei authored Aug 31, 2022
1 parent dcbe861 commit 1acb9c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/simplify_rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ let
@rule(real(~x::_isreal) => ~x)
@rule(imag(~x::_isreal) => zero(symtype(~x)))
@rule(ifelse(~x::is_literal_number, ~y, ~z) => ~x ? ~y : ~z)
@rule(ifelse(~x, ~y, ~y) => ~y)
]

TRIG_EXP_RULES = [
Expand Down

0 comments on commit 1acb9c2

Please sign in to comment.