Average Error: 58.0 → 0.7
Time: 9.8s
Precision: 64
Internal Precision: 128
\[\frac{e^{x} - e^{-x}}{2}\]
\[\frac{{x}^{5} \cdot \frac{1}{60} + \left(2 \cdot x + \left(x \cdot \left(\frac{1}{3} \cdot x\right)\right) \cdot x\right)}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 58.0

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

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

    \[\leadsto \frac{\color{blue}{{x}^{5} \cdot \frac{1}{60} + x \cdot \left(x \cdot \left(\frac{1}{3} \cdot x\right) + 2\right)}}{2}\]
  4. Using strategy rm
  5. Applied distribute-lft-in0.7

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

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

Reproduce

herbie shell --seed 2019050 
(FPCore (x)
  :name "Hyperbolic sine"
  (/ (- (exp x) (exp (- x))) 2))