Average Error: 58.2 → 0.5
Time: 34.6s
Precision: 64
Internal Precision: 1344
\[\frac{e^{x} - e^{-x}}{2}\]
\[\frac{x \cdot (\left({x}^{4}\right) \cdot \left(\frac{1}{120} \cdot 2\right) + 2)_* + \left(2 \cdot \frac{1}{6}\right) \cdot {x}^{3}}{2}\]

Error

Bits error versus x

Derivation

  1. Initial program 58.2

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

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

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

    \[\leadsto \frac{\color{blue}{e^{\log \left((x \cdot \left((\frac{1}{3} \cdot \left(x \cdot x\right) + 2)_*\right) + \left(\frac{1}{60} \cdot {x}^{5}\right))_*\right)}}}{2}\]
  6. Taylor expanded around 0 34.7

    \[\leadsto \frac{\color{blue}{\frac{1}{6} \cdot \left(e^{\log x + \log 2} \cdot {x}^{2}\right) + \left(e^{\log x + \log 2} + \frac{1}{120} \cdot \left(e^{\log x + \log 2} \cdot {x}^{4}\right)\right)}}{2}\]
  7. Applied simplify0.5

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

    \[\leadsto \frac{\color{blue}{x \cdot (\left({x}^{4}\right) \cdot \left(\frac{1}{120} \cdot 2\right) + 2)_* + \left(2 \cdot \frac{1}{6}\right) \cdot {x}^{3}}}{2}\]

Runtime

Time bar (total: 34.6s)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic sine"
  (/ (- (exp x) (exp (- x))) 2))