\[\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: 13.3 s
Input Error: 0.0
Output Error: 0.4
Log:
Profile: 🕒
\({\left(\sqrt[3]{\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)}\right)}^3\)
  1. Started with
    \[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
    0.0
  2. Using strategy rm
    0.0
  3. Applied add-cube-cbrt to get
    \[\color{red}{\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)} \leadsto \color{blue}{{\left(\sqrt[3]{\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)}\right)}^3}\]
    0.4

  4. 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))))