Average Error: 57.9 → 0.6
Time: 13.4s
Precision: 64
Internal Precision: 1344
\[\frac{e^{x} - e^{-x}}{2}\]
\[\frac{x \cdot (\frac{1}{3} \cdot \left(x \cdot x\right) + 2)_* + {x}^{5} \cdot \frac{1}{60}}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 57.9

    \[\frac{e^{x} - e^{-x}}{2}\]
  2. Taylor expanded around 0 0.6

    \[\leadsto \frac{\color{blue}{2 \cdot x + \left(\frac{1}{3} \cdot {x}^{3} + \frac{1}{60} \cdot {x}^{5}\right)}}{2}\]
  3. Simplified0.6

    \[\leadsto \frac{\color{blue}{(\left((\frac{1}{3} \cdot \left(x \cdot x\right) + 2)_*\right) \cdot x + \left({x}^{5} \cdot \frac{1}{60}\right))_*}}{2}\]
  4. Using strategy rm
  5. Applied fma-udef0.6

    \[\leadsto \frac{\color{blue}{(\frac{1}{3} \cdot \left(x \cdot x\right) + 2)_* \cdot x + {x}^{5} \cdot \frac{1}{60}}}{2}\]
  6. Final simplification0.6

    \[\leadsto \frac{x \cdot (\frac{1}{3} \cdot \left(x \cdot x\right) + 2)_* + {x}^{5} \cdot \frac{1}{60}}{2}\]

Runtime

Time bar (total: 13.4s)Debug logProfile

herbie shell --seed 2018225 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic sine"
  (/ (- (exp x) (exp (- x))) 2))