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

Error

Bits error versus x

Target

Original29.8
Comparison0.5
Herbie0.3
\[ 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. Applied taylor 0.0

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

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

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

Runtime

Time bar (total: 18.2s) Debug log

Please include this information when filing a bug report:

herbie shell --seed '#(2277612311 2645429965 1090895633 2857793080 2144184008 3989768357)'
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

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

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