e^{a \cdot x} - 1
\mathsf{expm1}\left(a \cdot x\right)
(FPCore (a x) :precision binary64 (- (exp (* a x)) 1.0))
(FPCore (a x) :precision binary64 (expm1 (* a x)))
double code(double a, double x) {
return exp(a * x) - 1.0;
}
double code(double a, double x) {
return expm1(a * x);
}




Bits error versus a




Bits error versus x
Results
| Original | 29.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.0 |
Initial program 29.3
Simplified0.0
Final simplification0.0
herbie shell --seed 2021210
(FPCore (a x)
:name "expax (section 3.5)"
:precision binary64
:herbie-target
(if (< (fabs (* a x)) 0.1) (* (* a x) (+ 1.0 (+ (/ (* a x) 2.0) (/ (pow (* a x) 2.0) 6.0)))) (- (exp (* a x)) 1.0))
(- (exp (* a x)) 1.0))