Open light-matters opened 2 months ago
Without I, the simplifier does as expected:
(e/simplify (* (e/exp (* -1 (c/complex 'k))) (e/exp (* 1 (c/complex 'k))))) ;=>1
With I, it does something very different:
(e/simplify (* (e/exp (* -1 I (complex 'k))) (e/exp (* 1 I (complex 'k))))) ;=> #emmy/complex [(- (* (cos (* -1 k)) (cos k)) (* (sin (* -1 k)) (sin k))) (+ (* (cos (* -1 k)) (sin k)) (* (sin (* -1 k)) (cos k)))]
This is a problem because multiplying by the conjugate is a very common operation.
Without I, the simplifier does as expected:
With I, it does something very different:
This is a problem because multiplying by the conjugate is a very common operation.