\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 19.75641587680443:\\
\;\;\;\;\frac{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(\log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x\right)}}{x}\\
\end{array}double f(double x, double y) {
double r22751730 = x;
double r22751731 = y;
double r22751732 = r22751730 + r22751731;
double r22751733 = r22751730 / r22751732;
double r22751734 = log(r22751733);
double r22751735 = r22751730 * r22751734;
double r22751736 = exp(r22751735);
double r22751737 = r22751736 / r22751730;
return r22751737;
}
double f(double x, double y) {
double r22751738 = y;
double r22751739 = 19.75641587680443;
bool r22751740 = r22751738 <= r22751739;
double r22751741 = x;
double r22751742 = cbrt(r22751741);
double r22751743 = r22751741 + r22751738;
double r22751744 = cbrt(r22751743);
double r22751745 = r22751742 / r22751744;
double r22751746 = log(r22751745);
double r22751747 = r22751746 * r22751741;
double r22751748 = r22751747 + r22751747;
double r22751749 = r22751748 + r22751747;
double r22751750 = exp(r22751749);
double r22751751 = r22751750 / r22751741;
double r22751752 = cbrt(r22751742);
double r22751753 = cbrt(r22751744);
double r22751754 = r22751752 / r22751753;
double r22751755 = log(r22751754);
double r22751756 = r22751752 * r22751752;
double r22751757 = r22751744 * r22751744;
double r22751758 = cbrt(r22751757);
double r22751759 = r22751756 / r22751758;
double r22751760 = log(r22751759);
double r22751761 = r22751755 + r22751760;
double r22751762 = r22751741 * r22751761;
double r22751763 = r22751762 + r22751748;
double r22751764 = exp(r22751763);
double r22751765 = r22751764 / r22751741;
double r22751766 = r22751740 ? r22751751 : r22751765;
return r22751766;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.9 |
| Herbie | 4.0 |
if y < 19.75641587680443Initial program 4.5
rmApplied add-cube-cbrt28.4
Applied add-cube-cbrt4.5
Applied times-frac4.5
Applied log-prod1.7
Applied distribute-lft-in1.7
Simplified0.9
if 19.75641587680443 < y Initial program 33.3
rmApplied add-cube-cbrt24.5
Applied add-cube-cbrt33.3
Applied times-frac33.3
Applied log-prod23.9
Applied distribute-lft-in23.9
Simplified21.7
rmApplied add-cube-cbrt18.6
Applied cbrt-prod14.8
Applied add-cube-cbrt14.2
Applied times-frac13.8
Applied log-prod13.8
Final simplification4.0
herbie shell --seed 2019163
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))