\frac{e^{a}}{e^{a} + e^{b}}e^{\sqrt[3]{{\left(a - \log \left(e^{a} + e^{b}\right)\right)}^{3}}}(FPCore (a b) :precision binary64 (/ (exp a) (+ (exp a) (exp b))))
(FPCore (a b) :precision binary64 (exp (cbrt (pow (- a (log (+ (exp a) (exp b)))) 3.0))))
double code(double a, double b) {
return exp(a) / (exp(a) + exp(b));
}
double code(double a, double b) {
return exp(cbrt(pow((a - log(exp(a) + exp(b))), 3.0)));
}




Bits error versus a




Bits error versus b
Results
| Original | 0.9 |
|---|---|
| Target | 0.0 |
| Herbie | 0.7 |
Initial program 0.9
rmApplied add-exp-log_binary64_21620.9
Applied div-exp_binary64_21750.7
rmApplied add-cbrt-cube_binary64_21600.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2020298
(FPCore (a b)
:name "Quotient of sum of exps"
:precision binary64
:herbie-target
(/ 1.0 (+ 1.0 (exp (- b a))))
(/ (exp a) (+ (exp a) (exp b))))