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 r524857 = x;
double r524858 = y;
double r524859 = z;
double r524860 = r524859 + r524858;
double r524861 = r524858 / r524860;
double r524862 = log(r524861);
double r524863 = r524858 * r524862;
double r524864 = exp(r524863);
double r524865 = r524864 / r524858;
double r524866 = r524857 + r524865;
return r524866;
}
double f(double x, double y, double z) {
double r524867 = x;
double r524868 = y;
double r524869 = cbrt(r524868);
double r524870 = r524869 * r524869;
double r524871 = exp(r524870);
double r524872 = z;
double r524873 = r524872 + r524868;
double r524874 = r524868 / r524873;
double r524875 = log(r524874);
double r524876 = r524869 * r524875;
double r524877 = pow(r524871, r524876);
double r524878 = r524877 / r524868;
double r524879 = r524867 + r524878;
return r524879;
}




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
(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)))