e^{x} - 1\mathsf{fma}\left({x}^{2}, \mathsf{fma}\left(x, \frac{1}{6}, \frac{1}{2}\right), x\right)double f(double x) {
double r75867 = x;
double r75868 = exp(r75867);
double r75869 = 1.0;
double r75870 = r75868 - r75869;
return r75870;
}
double f(double x) {
double r75871 = x;
double r75872 = 2.0;
double r75873 = pow(r75871, r75872);
double r75874 = 0.16666666666666666;
double r75875 = 0.5;
double r75876 = fma(r75871, r75874, r75875);
double r75877 = fma(r75873, r75876, r75871);
return r75877;
}




Bits error versus x
| Original | 58.7 |
|---|---|
| Target | 0.5 |
| Herbie | 0.5 |
Initial program 58.7
Taylor expanded around 0 0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2019306 +o rules:numerics
(FPCore (x)
:name "expm1 (example 3.7)"
:precision binary64
:pre (< -1.7e-4 x)
:herbie-target
(* x (+ (+ 1 (/ x 2)) (/ (* x x) 6)))
(- (exp x) 1))