\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.81817434923962274 \cdot 10^{140} \lor \neg \left(x \le 5.23835627656106507 \cdot 10^{-4}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r368747 = x;
double r368748 = y;
double r368749 = r368747 + r368748;
double r368750 = r368747 / r368749;
double r368751 = log(r368750);
double r368752 = r368747 * r368751;
double r368753 = exp(r368752);
double r368754 = r368753 / r368747;
return r368754;
}
double f(double x, double y) {
double r368755 = x;
double r368756 = -1.8181743492396227e+140;
bool r368757 = r368755 <= r368756;
double r368758 = 0.0005238356276561065;
bool r368759 = r368755 <= r368758;
double r368760 = !r368759;
bool r368761 = r368757 || r368760;
double r368762 = -1.0;
double r368763 = y;
double r368764 = r368762 * r368763;
double r368765 = exp(r368764);
double r368766 = r368765 / r368755;
double r368767 = cbrt(r368755);
double r368768 = r368755 + r368763;
double r368769 = cbrt(r368768);
double r368770 = r368767 / r368769;
double r368771 = fabs(r368770);
double r368772 = 2.0;
double r368773 = r368755 / r368772;
double r368774 = r368772 * r368773;
double r368775 = pow(r368771, r368774);
double r368776 = r368775 * r368775;
double r368777 = pow(r368770, r368755);
double r368778 = r368776 * r368777;
double r368779 = r368778 / r368755;
double r368780 = r368761 ? r368766 : r368779;
return r368780;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.6 |
| Herbie | 0.7 |
if x < -1.8181743492396227e+140 or 0.0005238356276561065 < x Initial program 12.0
Simplified12.0
Taylor expanded around inf 0.2
Simplified0.2
if -1.8181743492396227e+140 < x < 0.0005238356276561065Initial program 10.5
Simplified10.5
rmApplied add-cube-cbrt17.5
Applied add-cube-cbrt10.5
Applied times-frac10.5
Applied unpow-prod-down3.0
rmApplied add-sqr-sqrt3.0
Applied unpow-prod-down3.0
Simplified3.0
Simplified1.1
Final simplification0.7
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1 y)) x) (if (< y 2.817959242728288e+37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e+178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))