Skip to content

Commit

Permalink
Add x + conj(x) rule
Browse files Browse the repository at this point in the history
  • Loading branch information
amilsted committed Jun 26, 2023
1 parent e4519eb commit 8171356
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 @@ -67,6 +67,7 @@ let
@rule(conj(~x::_isreal) => ~x)
@rule(real(~x::_isreal) => ~x)
@rule(imag(~x::_isreal) => zero(symtype(~x)))
@rule(~x + conj(~x) => real(~x))
@rule(ifelse(~x::is_literal_number, ~y, ~z) => ~x ? ~y : ~z)
@rule(ifelse(~x, ~y, ~y) => ~y)
]
Expand Down

0 comments on commit 8171356

Please sign in to comment.