x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) \cdot y} \cdot \frac{{\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}double f(double x, double y, double z) {
double r443509 = x;
double r443510 = y;
double r443511 = z;
double r443512 = r443511 + r443510;
double r443513 = r443510 / r443512;
double r443514 = log(r443513);
double r443515 = r443510 * r443514;
double r443516 = exp(r443515);
double r443517 = r443516 / r443510;
double r443518 = r443509 + r443517;
return r443518;
}
double f(double x, double y, double z) {
double r443519 = x;
double r443520 = 2.0;
double r443521 = y;
double r443522 = cbrt(r443521);
double r443523 = z;
double r443524 = r443523 + r443521;
double r443525 = cbrt(r443524);
double r443526 = r443522 / r443525;
double r443527 = log(r443526);
double r443528 = r443520 * r443527;
double r443529 = r443528 * r443521;
double r443530 = exp(r443529);
double r443531 = pow(r443526, r443521);
double r443532 = r443531 / r443521;
double r443533 = r443530 * r443532;
double r443534 = r443519 + r443533;
return r443534;
}




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
Simplified5.8
rmApplied *-un-lft-identity5.8
Applied add-cube-cbrt19.6
Applied add-cube-cbrt5.8
Applied times-frac5.8
Applied unpow-prod-down1.9
Applied times-frac1.9
Simplified1.9
rmApplied add-exp-log39.5
Applied add-exp-log39.5
Applied prod-exp39.6
Applied add-exp-log39.5
Applied add-exp-log35.8
Applied prod-exp31.6
Applied div-exp31.6
Applied pow-exp31.1
Simplified0.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)))