Average Error: 58.9 → 0.4
Time: 3.0m
Precision: 64
Internal Precision: 1344
\[e^{x} - 1\]
\[\left(\frac{1}{6} \cdot {x}^{3} + x\right) + {x}^{2} \cdot \frac{1}{2}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original58.9
Target0.4
Herbie0.4
\[x \cdot \left(\left(1 + \frac{x}{2}\right) + \frac{x \cdot x}{6}\right)\]

Derivation

  1. Initial program 58.9

    \[e^{x} - 1\]
  2. Taylor expanded around 0 0.4

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

    \[\leadsto \left(\frac{1}{6} \cdot {x}^{3} + x\right) + {x}^{2} \cdot \frac{1}{2}\]

Runtime

Time bar (total: 3.0m)Debug logProfile

herbie shell --seed 2018214 
(FPCore (x)
  :name "expm1 (example 3.7)"
  :pre (< -0.00017 x)

  :herbie-target
  (* x (+ (+ 1 (/ x 2)) (/ (* x x) 6)))

  (- (exp x) 1))