\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.779773110456055906780648001586087048054 \lor \neg \left(x \le 1.553239629750104566379326253081072373163 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{y + x} \cdot \sqrt[3]{y + x}}\right)}^{x} \cdot {\left(\frac{x}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r321900 = x;
double r321901 = y;
double r321902 = r321900 + r321901;
double r321903 = r321900 / r321902;
double r321904 = log(r321903);
double r321905 = r321900 * r321904;
double r321906 = exp(r321905);
double r321907 = r321906 / r321900;
return r321907;
}
double f(double x, double y) {
double r321908 = x;
double r321909 = -2.779773110456056;
bool r321910 = r321908 <= r321909;
double r321911 = 1.5532396297501046e-07;
bool r321912 = r321908 <= r321911;
double r321913 = !r321912;
bool r321914 = r321910 || r321913;
double r321915 = 1.0;
double r321916 = y;
double r321917 = exp(r321916);
double r321918 = r321908 * r321917;
double r321919 = r321915 / r321918;
double r321920 = r321916 + r321908;
double r321921 = cbrt(r321920);
double r321922 = r321921 * r321921;
double r321923 = r321915 / r321922;
double r321924 = pow(r321923, r321908);
double r321925 = r321908 / r321921;
double r321926 = pow(r321925, r321908);
double r321927 = r321924 * r321926;
double r321928 = r321927 / r321908;
double r321929 = r321914 ? r321919 : r321928;
return r321929;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.5 |
| Herbie | 1.6 |
if x < -2.779773110456056 or 1.5532396297501046e-07 < x Initial program 10.8
Simplified10.8
Taylor expanded around inf 0.4
rmApplied neg-sub00.4
Applied exp-diff0.4
Applied associate-/l/0.4
Simplified0.4
if -2.779773110456056 < x < 1.5532396297501046e-07Initial program 11.4
Simplified11.4
rmApplied add-cube-cbrt11.4
Applied *-un-lft-identity11.4
Applied times-frac11.4
Applied unpow-prod-down2.9
Final simplification1.6
herbie shell --seed 2019195
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))