Average Error: 30.0 → 0.7
Time: 15.3s
Precision: 64
Internal Precision: 1408
\[\left(e^{x} - 2\right) + e^{-x}\]
\[\frac{1}{12} \cdot {x}^{4} + \left({x}^{6} \cdot \frac{1}{360} + x \cdot x\right)\]

Error

Bits error versus x

Target

Original30.0
Target0.0
Herbie0.7
\[4 \cdot {\left(\sinh \left(\frac{x}{2}\right)\right)}^{2}\]

Derivation

  1. Initial program 30.0

    \[\left(e^{x} - 2\right) + e^{-x}\]
  2. Taylor expanded around 0 0.7

    \[\leadsto \color{blue}{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}\]
  3. Taylor expanded around -inf 62.8

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

    \[\leadsto \color{blue}{\frac{1}{12} \cdot {x}^{4} + \left({x}^{6} \cdot \frac{1}{360} + x \cdot x\right)}\]

Runtime

Time bar (total: 15.3s)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' 
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

  :herbie-target
  (* 4 (pow (sinh (/ x 2)) 2))

  (+ (- (exp x) 2) (exp (- x))))