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{\left({\left(\left|\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right|\right)}^{y} \cdot {\left(\left|\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right|\right)}^{y}\right) \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left({\left(\left|\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right|\right)}^{y} \cdot {\left(\left|\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right|\right)}^{y}\right) \cdot e^{\frac{-1}{3} \cdot z}}{y}\\
\end{array}double f(double x, double y, double z) {
double r242711 = x;
double r242712 = y;
double r242713 = z;
double r242714 = r242713 + r242712;
double r242715 = r242712 / r242714;
double r242716 = log(r242715);
double r242717 = r242712 * r242716;
double r242718 = exp(r242717);
double r242719 = r242718 / r242712;
double r242720 = r242711 + r242719;
return r242720;
}
double f(double x, double y, double z) {
double r242721 = z;
double r242722 = 2.7983300664584073e+24;
bool r242723 = r242721 <= r242722;
double r242724 = 4.7668968669307006e+118;
bool r242725 = r242721 <= r242724;
double r242726 = !r242725;
bool r242727 = r242723 || r242726;
double r242728 = x;
double r242729 = y;
double r242730 = cbrt(r242729);
double r242731 = r242721 + r242729;
double r242732 = cbrt(r242731);
double r242733 = r242730 / r242732;
double r242734 = fabs(r242733);
double r242735 = pow(r242734, r242729);
double r242736 = r242735 * r242735;
double r242737 = pow(r242733, r242729);
double r242738 = r242736 * r242737;
double r242739 = r242738 / r242729;
double r242740 = r242728 + r242739;
double r242741 = -0.3333333333333333;
double r242742 = r242741 * r242721;
double r242743 = exp(r242742);
double r242744 = r242736 * r242743;
double r242745 = r242744 / r242729;
double r242746 = r242728 + r242745;
double r242747 = r242727 ? r242740 : r242746;
return r242747;
}




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-sqr-sqrt1.8
Applied unpow-prod-down1.8
Simplified1.8
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
rmApplied add-sqr-sqrt6.3
Applied unpow-prod-down6.3
Simplified6.3
Simplified6.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)))