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 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)} \cdot e^{y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{y + z}}\right)}}{y} + xdouble f(double x, double y, double z) {
double r19400467 = x;
double r19400468 = y;
double r19400469 = z;
double r19400470 = r19400469 + r19400468;
double r19400471 = r19400468 / r19400470;
double r19400472 = log(r19400471);
double r19400473 = r19400468 * r19400472;
double r19400474 = exp(r19400473);
double r19400475 = r19400474 / r19400468;
double r19400476 = r19400467 + r19400475;
return r19400476;
}
double f(double x, double y, double z) {
double r19400477 = y;
double r19400478 = cbrt(r19400477);
double r19400479 = z;
double r19400480 = r19400477 + r19400479;
double r19400481 = cbrt(r19400480);
double r19400482 = r19400478 / r19400481;
double r19400483 = log(r19400482);
double r19400484 = r19400477 * r19400483;
double r19400485 = r19400484 + r19400484;
double r19400486 = exp(r19400485);
double r19400487 = exp(r19400484);
double r19400488 = r19400486 * r19400487;
double r19400489 = r19400488 / r19400477;
double r19400490 = x;
double r19400491 = r19400489 + r19400490;
return r19400491;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.9 |
|---|---|
| Target | 1.0 |
| Herbie | 1.0 |
Initial program 5.9
rmApplied add-cube-cbrt18.9
Applied add-cube-cbrt5.9
Applied times-frac5.9
Applied log-prod1.9
Applied distribute-rgt-in1.9
Applied exp-sum1.9
Simplified1.0
Final simplification1.0
herbie shell --seed 2019164 +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 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))