x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)}^{\left(\sqrt[3]{y} \cdot \log \left(\frac{y}{z + y}\right)\right)}}{y}double f(double x, double y, double z) {
double r353899 = x;
double r353900 = y;
double r353901 = z;
double r353902 = r353901 + r353900;
double r353903 = r353900 / r353902;
double r353904 = log(r353903);
double r353905 = r353900 * r353904;
double r353906 = exp(r353905);
double r353907 = r353906 / r353900;
double r353908 = r353899 + r353907;
return r353908;
}
double f(double x, double y, double z) {
double r353909 = x;
double r353910 = y;
double r353911 = cbrt(r353910);
double r353912 = r353911 * r353911;
double r353913 = exp(r353912);
double r353914 = z;
double r353915 = r353914 + r353910;
double r353916 = r353910 / r353915;
double r353917 = log(r353916);
double r353918 = r353911 * r353917;
double r353919 = pow(r353913, r353918);
double r353920 = r353919 / r353910;
double r353921 = r353909 + r353920;
return r353921;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 0.9 |
| Herbie | 0.9 |
Initial program 5.8
rmApplied add-log-exp34.8
Applied exp-to-pow0.9
rmApplied add-cube-cbrt0.9
Applied exp-prod0.9
Applied pow-pow0.9
Final simplification0.9
herbie shell --seed 2020047 +o rules:numerics
(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)))