Average Error: 0.0 → 0.2
Time: 10.0s
Precision: 64
Internal Precision: 576
\[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
\[\cos re \cdot \left(\log \left(e^{\frac{0.5}{e^{im}}}\right) + 0.5 \cdot e^{im}\right)\]

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(0.5 \cdot \cos re\right) \cdot \left(e^{-im} + e^{im}\right)\]
  2. Initial simplification0.0

    \[\leadsto \left(\frac{0.5}{e^{im}} + 0.5 \cdot e^{im}\right) \cdot \cos re\]
  3. Using strategy rm
  4. Applied add-log-exp0.2

    \[\leadsto \left(\color{blue}{\log \left(e^{\frac{0.5}{e^{im}}}\right)} + 0.5 \cdot e^{im}\right) \cdot \cos re\]
  5. Final simplification0.2

    \[\leadsto \cos re \cdot \left(\log \left(e^{\frac{0.5}{e^{im}}}\right) + 0.5 \cdot e^{im}\right)\]

Runtime

Time bar (total: 10.0s)Debug logProfile

herbie shell --seed 2018252 
(FPCore (re im)
  :name "math.cos on complex, real part"
  (* (* 0.5 (cos re)) (+ (exp (- im)) (exp im))))