Average Error: 30.1 → 0.6
Time: 15.0s
Precision: 64
Internal Precision: 1344
\[\left(e^{x} - 2\right) + e^{-x}\]
\[(\frac{1}{12} \cdot \left({x}^{4}\right) + \left(\sqrt{(\frac{1}{360} \cdot \left({x}^{6}\right) + \left(x \cdot x\right))_*} \cdot \sqrt{(\frac{1}{360} \cdot \left({x}^{6}\right) + \left(x \cdot x\right))_*}\right))_*\]

Error

Bits error versus x

Target

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

Derivation

  1. Initial program 30.1

    \[\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. Simplified0.6

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

    \[\leadsto (\frac{1}{12} \cdot \left({x}^{4}\right) + \color{blue}{\left(\sqrt{(\frac{1}{360} \cdot \left({x}^{6}\right) + \left(x \cdot x\right))_*} \cdot \sqrt{(\frac{1}{360} \cdot \left({x}^{6}\right) + \left(x \cdot x\right))_*}\right)})_*\]
  6. Final simplification0.6

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

Runtime

Time bar (total: 15.0s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.60.60.10.60%
herbie shell --seed 2018286 +o rules:numerics
(FPCore (x)
  :name "exp2 (problem 3.3.7)"

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

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