Average Error: 29.8 → 0.6
Time: 23.1s
Precision: 64
Internal Precision: 128
\[\left(e^{x} - 2\right) + e^{-x}\]
\[\left(x + \left({x}^{5} \cdot \frac{1}{1920} + {x}^{3} \cdot \frac{1}{24}\right)\right) \cdot \left(x + \left({x}^{5} \cdot \frac{1}{1920} + {x}^{3} \cdot \frac{1}{24}\right)\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 29.8

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

    \[\leadsto \color{blue}{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.6

    \[\leadsto \color{blue}{\sqrt{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)} \cdot \sqrt{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}}\]
  5. Taylor expanded around 0 16.1

    \[\leadsto \sqrt{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)} \cdot \color{blue}{\left(x + \left(\frac{1}{24} \cdot {x}^{3} + \frac{1}{1920} \cdot {x}^{5}\right)\right)}\]
  6. Taylor expanded around 0 0.6

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

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

Runtime

Time bar (total: 23.1s)Debug logProfile

herbie shell --seed 2018348 
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

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

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