x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;z \le 2798330066458407314915328 \lor \neg \left(z \le 4.76689686693070055018888846744602636955 \cdot 10^{118}\right):\\
\;\;\;\;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}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z + y} \cdot \sqrt[3]{z + y}}\right)}^{y} \cdot e^{\frac{-1}{3} \cdot z}}{y}\\
\end{array}double f(double x, double y, double z) {
double r252593 = x;
double r252594 = y;
double r252595 = z;
double r252596 = r252595 + r252594;
double r252597 = r252594 / r252596;
double r252598 = log(r252597);
double r252599 = r252594 * r252598;
double r252600 = exp(r252599);
double r252601 = r252600 / r252594;
double r252602 = r252593 + r252601;
return r252602;
}
double f(double x, double y, double z) {
double r252603 = z;
double r252604 = 2.7983300664584073e+24;
bool r252605 = r252603 <= r252604;
double r252606 = 4.7668968669307006e+118;
bool r252607 = r252603 <= r252606;
double r252608 = !r252607;
bool r252609 = r252605 || r252608;
double r252610 = x;
double r252611 = 2.0;
double r252612 = y;
double r252613 = cbrt(r252612);
double r252614 = r252603 + r252612;
double r252615 = cbrt(r252614);
double r252616 = r252613 / r252615;
double r252617 = log(r252616);
double r252618 = r252611 * r252617;
double r252619 = r252618 * r252612;
double r252620 = exp(r252619);
double r252621 = pow(r252616, r252612);
double r252622 = r252620 * r252621;
double r252623 = r252622 / r252612;
double r252624 = r252610 + r252623;
double r252625 = r252613 * r252613;
double r252626 = r252615 * r252615;
double r252627 = r252625 / r252626;
double r252628 = pow(r252627, r252612);
double r252629 = -0.3333333333333333;
double r252630 = r252629 * r252603;
double r252631 = exp(r252630);
double r252632 = r252628 * r252631;
double r252633 = r252632 / r252612;
double r252634 = r252610 + r252633;
double r252635 = r252609 ? r252624 : r252634;
return r252635;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 1.1 |
| Herbie | 2.0 |
if z < 2.7983300664584073e+24 or 4.7668968669307006e+118 < z Initial program 5.9
Simplified5.9
rmApplied add-cube-cbrt19.3
Applied add-cube-cbrt5.9
Applied times-frac5.9
Applied unpow-prod-down1.8
rmApplied add-exp-log40.1
Applied add-exp-log40.1
Applied prod-exp40.1
Applied add-exp-log40.0
Applied add-exp-log36.2
Applied prod-exp32.0
Applied div-exp32.0
Applied pow-exp31.5
Simplified0.7
if 2.7983300664584073e+24 < z < 4.7668968669307006e+118Initial program 10.9
Simplified10.9
rmApplied add-cube-cbrt17.9
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied unpow-prod-down6.3
Taylor expanded around inf 18.4
Simplified18.4
Final simplification2.0
herbie shell --seed 2019323 +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)))