Average Error: 43.4 → 31.3
Time: 31.6s
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\]

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 43.4

    \[\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.3

    \[\leadsto \color{blue}{x \cdot y}\]
  4. Final simplification31.3

    \[\leadsto x \cdot y\]

Runtime

Time bar (total: 31.6s)Debug logProfile

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