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

Error

Bits error versus x

Target

Original34.0
Comparison8.8
Herbie0.1
\[ 4 \cdot {\left(\sinh \left(\frac{x}{2}\right)\right)}^{2} \]

Derivation

  1. Initial program 34.0

    \[\left(e^{x} - 2\right) + e^{-x}\]
  2. Applied taylor 0.1

    \[\leadsto {x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{{x}^{2} + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 30.6s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1068028399 4028058041 2917032441 2563479541 765645300 1132738916)'
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

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

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