Average Error: 29.2 → 0.0
Time: 3.2s
Precision: 64
Internal Precision: 1344
\[e^{a \cdot x} - 1\]
\[(e^{x \cdot a} - 1)^*\]

Error

Bits error versus a

Bits error versus x

Target

Original29.2
Target0.2
Herbie0.0
\[\begin{array}{l} \mathbf{if}\;\left|a \cdot x\right| \lt \frac{1}{10}:\\ \;\;\;\;\left(a \cdot x\right) \cdot \left(1 + \left(\frac{a \cdot x}{2} + \frac{{\left(a \cdot x\right)}^{2}}{6}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{a \cdot x} - 1\\ \end{array}\]

Derivation

  1. Initial program 29.2

    \[e^{a \cdot x} - 1\]
  2. Applied simplify0.0

    \[\leadsto \color{blue}{(e^{x \cdot a} - 1)^*}\]

Runtime

Time bar (total: 3.2s)Debug logProfile

herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)' +o rules:numerics
(FPCore (a x)
  :name "expax (section 3.5)"

  :herbie-target
  (if (< (fabs (* a x)) 1/10) (* (* a x) (+ 1 (+ (/ (* a x) 2) (/ (pow (* a x) 2) 6)))) (- (exp (* a x)) 1))

  (- (exp (* a x)) 1))