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




Bits error versus x
Results
| Original | 39.9 |
|---|---|
| Target | 40.2 |
| Herbie | 39.8 |
Initial program 39.9
rmApplied div-sub_binary64_344639.5
rmApplied clear-num_binary64_345539.6
rmApplied *-un-lft-identity_binary64_345239.6
Applied add-cube-cbrt_binary64_342339.9
Applied times-frac_binary64_344739.8
Simplified39.8
Final simplification39.8
herbie shell --seed 2020270
(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))