Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
\[\Re(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
\[\frac{\sqrt[3]{{\left(e^{-1 \cdot x} + e^{x}\right)}^{3}}}{2} \cdot \cos y\]

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

    \[\Re(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{e^{x} + e^{-x}}{2} \cdot \cos y}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube0.0

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(e^{x} + e^{-x}\right) \cdot \left(e^{x} + e^{-x}\right)\right) \cdot \left(e^{x} + e^{-x}\right)}}}{2} \cdot \cos y\]
  5. Simplified0.0

    \[\leadsto \frac{\sqrt[3]{\color{blue}{{\left(e^{-1 \cdot x} + e^{x}\right)}^{3}}}}{2} \cdot \cos y\]
  6. Final simplification0.0

    \[\leadsto \frac{\sqrt[3]{{\left(e^{-1 \cdot x} + e^{x}\right)}^{3}}}{2} \cdot \cos y\]

Reproduce

herbie shell --seed 2020121 +o rules:numerics
(FPCore (x y)
  :name "Euler formula real part (p55)"
  :precision binary64
  (re (complex (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) (* (/ (- (exp x) (exp (- x))) 2) (sin y)))))