Average Error: 59.0 → 0.0
Time: 6.9s
Precision: 64
Internal precision: 1408
\[e^{x} - 1\]
\[\left(\sqrt{e^{x}} + 1\right) \cdot \left(x \cdot \left(\frac{1}{8} \cdot x + \frac{1}{2}\right) + {x}^3 \cdot \frac{1}{48}\right)\]

Error

Bits error versus x

Target

Original59.0
Comparison0.5
Herbie0.0
\[ x \cdot \left(\left(1 + \frac{x}{2}\right) + \frac{{x}^2}{6}\right) \]

Derivation

  1. Initial program 59.0

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

    \[\leadsto \color{blue}{{\left(\sqrt{e^{x}}\right)}^2} - 1\]
  4. Applied difference-of-sqr-1 59.1

    \[\leadsto \color{blue}{\left(\sqrt{e^{x}} + 1\right) \cdot \left(\sqrt{e^{x}} - 1\right)}\]
  5. Applied taylor 0.0

    \[\leadsto \left(\sqrt{e^{x}} + 1\right) \cdot \left(\frac{1}{8} \cdot {x}^2 + \left(\frac{1}{48} \cdot {x}^{3} + \frac{1}{2} \cdot x\right)\right)\]
  6. Taylor expanded around 0 0.0

    \[\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)}\]
  7. Applied simplify 0.0

    \[\leadsto \color{blue}{\left(\sqrt{e^{x}} + 1\right) \cdot \left(x \cdot \left(\frac{1}{8} \cdot x + \frac{1}{2}\right) + {x}^3 \cdot \frac{1}{48}\right)}\]
  8. Removed slow pow expressions

Runtime

Time bar (total: 6.9s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064651971 495577305 2200811460 13024471 864198081 231948279)'
(FPCore (x)
  :name "expm1 (example 3.7)"
  :pre (< -0.00017 x)

  :target
  (* x (+ (+ 1 (/ x 2)) (/ (sqr x) 6)))

  (- (exp x) 1))