Average Error: 59.0 → 0.0
Time: 19.6s
Precision: 64
Ground Truth: 128
\[e^{x} - 1\]
\[\left(\sqrt{e^{x}} + 1\right) \cdot \left(\frac{1}{8} \cdot {x}^2 + \left(\frac{1}{2} \cdot x + \frac{1}{48} \cdot {x}^{3}\right)\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}{2} \cdot x + \frac{1}{48} \cdot {x}^{3}\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}{2} \cdot x + \frac{1}{48} \cdot {x}^{3}\right)\right)}\]
  7. Removed slow pow expressions

Runtime

Total time: 19.6s Debug log

Please report a bug with the following info:

herbie --seed '#(420872445 269387455 1432941526 3598940836 3340379219 2165517561)'
(FPCore (x)
  :name "NMSE example 3.7"
  :pre (< -0.00017 x)

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

  (- (exp x) 1))