x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\frac{e^{y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}}{y} + xdouble f(double x, double y, double z) {
double r19319786 = x;
double r19319787 = y;
double r19319788 = z;
double r19319789 = r19319788 + r19319787;
double r19319790 = r19319787 / r19319789;
double r19319791 = log(r19319790);
double r19319792 = r19319787 * r19319791;
double r19319793 = exp(r19319792);
double r19319794 = r19319793 / r19319787;
double r19319795 = r19319786 + r19319794;
return r19319795;
}
double f(double x, double y, double z) {
double r19319796 = y;
double r19319797 = cbrt(r19319796);
double r19319798 = z;
double r19319799 = r19319796 + r19319798;
double r19319800 = cbrt(r19319799);
double r19319801 = r19319797 / r19319800;
double r19319802 = log(r19319801);
double r19319803 = r19319796 * r19319802;
double r19319804 = exp(r19319803);
double r19319805 = r19319804 / r19319796;
double r19319806 = x;
double r19319807 = r19319805 + r19319806;
return r19319807;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.0 |
| Herbie | 1.2 |
Initial program 6.0
rmApplied add-cube-cbrt19.5
Applied add-cube-cbrt6.0
Applied times-frac6.0
Applied log-prod2.2
Taylor expanded around inf 1.2
Final simplification1.2
herbie shell --seed 2019192 +o rules:numerics
(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)))