x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{y}\right)}^{\left(\log \left(\frac{y}{z + y}\right)\right)}}{y}double f(double x, double y, double z) {
double r421879 = x;
double r421880 = y;
double r421881 = z;
double r421882 = r421881 + r421880;
double r421883 = r421880 / r421882;
double r421884 = log(r421883);
double r421885 = r421880 * r421884;
double r421886 = exp(r421885);
double r421887 = r421886 / r421880;
double r421888 = r421879 + r421887;
return r421888;
}
double f(double x, double y, double z) {
double r421889 = x;
double r421890 = y;
double r421891 = exp(r421890);
double r421892 = z;
double r421893 = r421892 + r421890;
double r421894 = r421890 / r421893;
double r421895 = log(r421894);
double r421896 = pow(r421891, r421895);
double r421897 = r421896 / r421890;
double r421898 = r421889 + r421897;
return r421898;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.0 |
| Herbie | 1.1 |
Initial program 6.0
rmApplied add-log-exp36.0
Applied exp-to-pow1.1
Final simplification1.1
herbie shell --seed 2020046
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))