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

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. Initial simplification0.0

    \[\leadsto \frac{(\left(\cos y\right) \cdot \left(e^{x}\right) + \left(\frac{\cos y}{e^{x}}\right))_*}{2}\]
  3. Using strategy rm
  4. Applied fma-udef0.0

    \[\leadsto \frac{\color{blue}{\cos y \cdot e^{x} + \frac{\cos y}{e^{x}}}}{2}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.0

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

    \[\leadsto \frac{\color{blue}{\left(\cos y \cdot \left(\sqrt[3]{e^{x}} \cdot \sqrt[3]{e^{x}}\right)\right) \cdot \sqrt[3]{e^{x}}} + \frac{\cos y}{e^{x}}}{2}\]
  8. Taylor expanded around inf 0.0

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

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

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

Runtime

Time bar (total: 17.7s)Debug logProfile

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