Average Error: 43.5 → 31.2
Time: 35.2s
Precision: 64
Internal Precision: 1344
\[\Im(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
\[(x \cdot y + \left(\frac{1}{6} \cdot \left(y \cdot {x}^{3}\right)\right))_*\]

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 43.5

    \[\Im(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
  2. Initial simplification43.5

    \[\leadsto \frac{e^{x} \cdot \sin y - \frac{\sin y}{e^{x}}}{2}\]
  3. Taylor expanded around 0 31.5

    \[\leadsto \color{blue}{\left(x \cdot y + \frac{1}{6} \cdot \left({x}^{3} \cdot y\right)\right) - \frac{1}{6} \cdot \left(x \cdot {y}^{3}\right)}\]
  4. Taylor expanded around -inf 31.2

    \[\leadsto \left(x \cdot y + \frac{1}{6} \cdot \left({x}^{3} \cdot y\right)\right) - \color{blue}{0}\]
  5. Using strategy rm
  6. Applied fma-def31.2

    \[\leadsto \color{blue}{(x \cdot y + \left(\frac{1}{6} \cdot \left({x}^{3} \cdot y\right)\right))_*} - 0\]
  7. Final simplification31.2

    \[\leadsto (x \cdot y + \left(\frac{1}{6} \cdot \left(y \cdot {x}^{3}\right)\right))_*\]

Runtime

Time bar (total: 35.2s)Debug logProfile

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