x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) \cdot y} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}double f(double x, double y, double z) {
double r259906 = x;
double r259907 = y;
double r259908 = z;
double r259909 = r259908 + r259907;
double r259910 = r259907 / r259909;
double r259911 = log(r259910);
double r259912 = r259907 * r259911;
double r259913 = exp(r259912);
double r259914 = r259913 / r259907;
double r259915 = r259906 + r259914;
return r259915;
}
double f(double x, double y, double z) {
double r259916 = x;
double r259917 = 2.0;
double r259918 = y;
double r259919 = cbrt(r259918);
double r259920 = z;
double r259921 = r259920 + r259918;
double r259922 = cbrt(r259921);
double r259923 = r259919 / r259922;
double r259924 = log(r259923);
double r259925 = r259917 * r259924;
double r259926 = r259925 * r259918;
double r259927 = exp(r259926);
double r259928 = pow(r259923, r259918);
double r259929 = r259927 * r259928;
double r259930 = r259929 / r259918;
double r259931 = r259916 + r259930;
return r259931;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 0.9 |
| Herbie | 0.9 |
Initial program 6.3
Simplified6.3
rmApplied add-cube-cbrt19.6
Applied add-cube-cbrt6.3
Applied times-frac6.3
Applied unpow-prod-down2.2
rmApplied add-exp-log40.2
Applied add-exp-log40.2
Applied prod-exp40.3
Applied add-exp-log40.2
Applied add-exp-log36.3
Applied prod-exp32.1
Applied div-exp32.1
Applied pow-exp31.4
Simplified0.9
Final simplification0.9
herbie shell --seed 2019305 +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.1154157598e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))