\frac{e^{x} - 1}{x}\frac{\frac{e^{x}}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{x}} - \frac{1}{x}(FPCore (x) :precision binary64 (/ (- (exp x) 1.0) x))
(FPCore (x) :precision binary64 (- (/ (/ (exp x) (* (cbrt x) (cbrt x))) (cbrt x)) (/ 1.0 x)))
double code(double x) {
return (exp(x) - 1.0) / x;
}
double code(double x) {
return ((exp(x) / (cbrt(x) * cbrt(x))) / cbrt(x)) - (1.0 / x);
}




Bits error versus x
Results
| Original | 40.0 |
|---|---|
| Target | 40.5 |
| Herbie | 40.0 |
Initial program 40.0
rmApplied div-sub_binary64_168139.8
rmApplied add-cube-cbrt_binary64_165840.0
Applied associate-/r*_binary64_175040.0
Final simplification40.0
herbie shell --seed 2020268
(FPCore (x)
:name "Kahan's exp quotient"
:precision binary64
:herbie-target
(if (and (< x 1.0) (> x -1.0)) (/ (- (exp x) 1.0) (log (exp x))) (/ (- (exp x) 1.0) x))
(/ (- (exp x) 1.0) x))