x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{y}\right)}^{\left(\log \left(\frac{y}{y + z}\right)\right)}}{y}double f(double x, double y, double z) {
double r16958091 = x;
double r16958092 = y;
double r16958093 = z;
double r16958094 = r16958093 + r16958092;
double r16958095 = r16958092 / r16958094;
double r16958096 = log(r16958095);
double r16958097 = r16958092 * r16958096;
double r16958098 = exp(r16958097);
double r16958099 = r16958098 / r16958092;
double r16958100 = r16958091 + r16958099;
return r16958100;
}
double f(double x, double y, double z) {
double r16958101 = x;
double r16958102 = y;
double r16958103 = exp(r16958102);
double r16958104 = z;
double r16958105 = r16958102 + r16958104;
double r16958106 = r16958102 / r16958105;
double r16958107 = log(r16958106);
double r16958108 = pow(r16958103, r16958107);
double r16958109 = r16958108 / r16958102;
double r16958110 = r16958101 + r16958109;
return r16958110;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 1.2 |
| Herbie | 1.3 |
Initial program 5.8
rmApplied add-log-exp35.8
Applied exp-to-pow1.3
Final simplification1.3
herbie shell --seed 2019165
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1.0 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))