\[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
Test:
math.cos on complex, real part
Bits:
128 bits
Bits error versus re
Bits error versus im
Time: 4.2 s
Input Error: 0.0
Output Error: 0.0
Log:
Profile: 🕒
\(\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\)
  1. Started with
    \[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
    0.0

  2. Removed slow pow expressions

Original test:


(lambda ((re default) (im default))
  #:name "math.cos on complex, real part"
  (* (* 0.5 (cos re)) (+ (exp (- im)) (exp im))))