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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 29.4

    \[\left(e^{x} - 2\right) + e^{-x}\]
  2. Initial simplification29.4

    \[\leadsto \left(e^{x} - 2\right) - \frac{-1}{e^{x}}\]
  3. 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)}\]
  4. Using strategy rm
  5. Applied add-log-exp0.7

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

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

Runtime

Time bar (total: 13.2s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.70.70.00.60%
herbie shell --seed 2018296 
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

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

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