\frac{e^{a}}{e^{a} + e^{b}}\frac{\sqrt{e^{a}}}{\frac{e^{a} + e^{b}}{\sqrt{e^{a}}}}double f(double a, double b) {
double r154298 = a;
double r154299 = exp(r154298);
double r154300 = b;
double r154301 = exp(r154300);
double r154302 = r154299 + r154301;
double r154303 = r154299 / r154302;
return r154303;
}
double f(double a, double b) {
double r154304 = a;
double r154305 = exp(r154304);
double r154306 = sqrt(r154305);
double r154307 = b;
double r154308 = exp(r154307);
double r154309 = r154305 + r154308;
double r154310 = r154309 / r154306;
double r154311 = r154306 / r154310;
return r154311;
}




Bits error versus a




Bits error versus b
Results
| Original | 0.8 |
|---|---|
| Target | 0.0 |
| Herbie | 0.8 |
Initial program 0.8
rmApplied add-sqr-sqrt0.8
Applied associate-/l*0.8
Final simplification0.8
herbie shell --seed 2020083
(FPCore (a b)
:name "Quotient of sum of exps"
:precision binary64
:herbie-target
(/ 1 (+ 1 (exp (- b a))))
(/ (exp a) (+ (exp a) (exp b))))