\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 5.639442099966964:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\left(\left(\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{x + y}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r23335697 = x;
double r23335698 = y;
double r23335699 = r23335697 + r23335698;
double r23335700 = r23335697 / r23335699;
double r23335701 = log(r23335700);
double r23335702 = r23335697 * r23335701;
double r23335703 = exp(r23335702);
double r23335704 = r23335703 / r23335697;
return r23335704;
}
double f(double x, double y) {
double r23335705 = y;
double r23335706 = 5.639442099966964;
bool r23335707 = r23335705 <= r23335706;
double r23335708 = 1.0;
double r23335709 = x;
double r23335710 = r23335708 / r23335709;
double r23335711 = cbrt(r23335709);
double r23335712 = r23335711 * r23335711;
double r23335713 = cbrt(r23335712);
double r23335714 = cbrt(r23335711);
double r23335715 = r23335713 * r23335714;
double r23335716 = r23335715 * r23335711;
double r23335717 = r23335709 + r23335705;
double r23335718 = r23335711 / r23335717;
double r23335719 = r23335716 * r23335718;
double r23335720 = log(r23335719);
double r23335721 = r23335720 * r23335709;
double r23335722 = exp(r23335721);
double r23335723 = r23335722 / r23335709;
double r23335724 = r23335707 ? r23335710 : r23335723;
return r23335724;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.9 |
| Herbie | 7.0 |
if y < 5.639442099966964Initial program 4.5
Taylor expanded around inf 1.2
if 5.639442099966964 < y Initial program 33.3
rmApplied *-un-lft-identity33.3
Applied add-cube-cbrt25.6
Applied times-frac25.5
Simplified25.5
rmApplied add-cube-cbrt25.7
Applied cbrt-prod25.6
Final simplification7.0
herbie shell --seed 2019163 +o rules:numerics
(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))