e^{x} - 1\left(1 + \sqrt{e^{x}}\right) \cdot \left(x \cdot 0.5 + \left(0.0026041666666666665 \cdot {x}^{4} + \frac{\left(x \cdot x\right) \cdot \left(0.015625 - x \cdot \log \left(e^{x \cdot 0.00043402777777777775}\right)\right)}{0.125 - x \cdot 0.020833333333333332}\right)\right)(FPCore (x) :precision binary64 (- (exp x) 1.0))
(FPCore (x)
:precision binary64
(*
(+ 1.0 (sqrt (exp x)))
(+
(* x 0.5)
(+
(* 0.0026041666666666665 (pow x 4.0))
(/
(* (* x x) (- 0.015625 (* x (log (exp (* x 0.00043402777777777775))))))
(- 0.125 (* x 0.020833333333333332)))))))double code(double x) {
return exp(x) - 1.0;
}
double code(double x) {
return (1.0 + sqrt(exp(x))) * ((x * 0.5) + ((0.0026041666666666665 * pow(x, 4.0)) + (((x * x) * (0.015625 - (x * log(exp(x * 0.00043402777777777775))))) / (0.125 - (x * 0.020833333333333332)))));
}












Bits error versus x
Results
| Original | 58.7 |
|---|---|
| Target | 0.4 |
| Herbie | 0.3 |
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 21120 |
| Alternative 2 | |
|---|---|
| Error | 0.3 |
| Cost | 20608 |
| Alternative 3 | |
|---|---|
| Error | 0.3 |
| Cost | 20480 |
| Alternative 4 | |
|---|---|
| Error | 0.3 |
| Cost | 9216 |
| Alternative 5 | |
|---|---|
| Error | 0.3 |
| Cost | 960 |
| Alternative 6 | |
|---|---|
| Error | 0.4 |
| Cost | 704 |
| Alternative 7 | |
|---|---|
| Error | 0.6 |
| Cost | 448 |
| Alternative 8 | |
|---|---|
| Error | 1.3 |
| Cost | 64 |


Initial program 58.7
rmApplied add-sqr-sqrt_binary64_112358.7
Applied difference-of-sqr-1_binary64_107158.7
Simplified58.7
Simplified58.7
Taylor expanded around 0 0.3
Simplified0.3
rmApplied flip-+_binary64_10750.3
Applied associate-*r/_binary64_10430.3
Simplified0.3
rmApplied add-log-exp_binary64_11400.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2021040
(FPCore (x)
:name "expm1 (example 3.7)"
:precision binary64
:pre (< -0.00017 x)
:herbie-target
(* x (+ (+ 1.0 (/ x 2.0)) (/ (* x x) 6.0)))
(- (exp x) 1.0))