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

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-cube-cbrt0.0

    \[\leadsto \color{blue}{\left(\left(\sqrt[3]{\frac{e^{x} + e^{-x}}{2}} \cdot \sqrt[3]{\frac{e^{x} + e^{-x}}{2}}\right) \cdot \sqrt[3]{\frac{e^{x} + e^{-x}}{2}}\right)} \cdot \cos y\]
  5. Applied associate-*l*0.0

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

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

Reproduce

herbie shell --seed 2020105 +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)))))