Average Error: 57.9 → 0.7
Time: 2.6s
Precision: binary64
\[\frac{e^{x} - e^{-x}}{2}\]
\[\frac{x + \left(x + \left(\frac{1}{3} \cdot {x}^{3} + \frac{1}{60} \cdot {x}^{5}\right)\right)}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 57.9

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

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

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

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

Reproduce

herbie shell --seed 2020185 
(FPCore (x)
  :name "Hyperbolic sine"
  :precision binary64
  (/ (- (exp x) (exp (neg x))) 2.0))