Average Error: 58.7 → 0.4
Time: 39.9s
Precision: 64
Internal Precision: 1344
\[e^{x} - 1\]
\[\left(x \cdot \left(x \cdot \left(\frac{1}{48} \cdot x\right) + \left(\frac{1}{8} \cdot x + \frac{1}{2}\right)\right)\right) \cdot \left(1 + \sqrt{e^{x}}\right)\]

Error

Bits error versus x

Target

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

Derivation

  1. Initial program 58.7

    \[e^{x} - 1\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt58.8

    \[\leadsto \color{blue}{\sqrt{e^{x}} \cdot \sqrt{e^{x}}} - 1\]
  4. Applied difference-of-sqr-158.8

    \[\leadsto \color{blue}{\left(\sqrt{e^{x}} + 1\right) \cdot \left(\sqrt{e^{x}} - 1\right)}\]
  5. Taylor expanded around 0 0.4

    \[\leadsto \left(\sqrt{e^{x}} + 1\right) \cdot \color{blue}{\left(\frac{1}{8} \cdot {x}^{2} + \left(\frac{1}{48} \cdot {x}^{3} + \frac{1}{2} \cdot x\right)\right)}\]
  6. Applied simplify0.4

    \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(\frac{1}{48} \cdot x\right) + \left(\frac{1}{8} \cdot x + \frac{1}{2}\right)\right)\right) \cdot \left(1 + \sqrt{e^{x}}\right)}\]

Runtime

Time bar (total: 39.9s)Debug logProfile

herbie shell --seed '#(1071852389 864846987 1238109217 3425890003 4124793586 650694553)' 
(FPCore (x)
  :name "expm1 (example 3.7)"
  :pre (< -0.00017 x)

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

  (- (exp x) 1))