Average Error: 0.0 → 0.0
Time: 25.4s
Precision: 64
Ground Truth: 128
\[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
\[\frac{0.5 \cdot \cos re}{e^{im}} + \left(0.5 \cdot \cos re\right) \cdot e^{im}\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Initial program 0.0

    \[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in 0.0

    \[\leadsto \color{blue}{\left(0.5 \cdot \cos re\right) \cdot e^{-im} + \left(0.5 \cdot \cos re\right) \cdot e^{im}}\]
  4. Applied simplify 0.0

    \[\leadsto \color{blue}{\frac{0.5 \cdot \cos re}{e^{im}}} + \left(0.5 \cdot \cos re\right) \cdot e^{im}\]
  5. Removed slow pow expressions

Runtime

Total time: 25.4s Debug log

Please include this information when filing a bug report:

herbie --seed '#(2173782792 3297191053 3809462725 882215698 4208561572 4127421056)'
(FPCore (re im)
  :name "math.cos on complex, real part"
  (* (* 0.5 (cos re)) (+ (exp (- im)) (exp im))))