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

Error

Bits error versus a

Bits error versus x

Target

Original29.5
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.5

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

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

Runtime

Time bar (total: 10.7s)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +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))