\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.006483848542437442574737360700964927673 \lor \neg \left(x \le 2.852199015031174304536241058074557641432 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{x}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r446914 = x;
double r446915 = y;
double r446916 = r446914 + r446915;
double r446917 = r446914 / r446916;
double r446918 = log(r446917);
double r446919 = r446914 * r446918;
double r446920 = exp(r446919);
double r446921 = r446920 / r446914;
return r446921;
}
double f(double x, double y) {
double r446922 = x;
double r446923 = -7.006483848542437;
bool r446924 = r446922 <= r446923;
double r446925 = 2.852199015031174e-14;
bool r446926 = r446922 <= r446925;
double r446927 = !r446926;
bool r446928 = r446924 || r446927;
double r446929 = -1.0;
double r446930 = y;
double r446931 = r446929 * r446930;
double r446932 = exp(r446931);
double r446933 = r446932 / r446922;
double r446934 = 1.0;
double r446935 = r446922 + r446930;
double r446936 = cbrt(r446935);
double r446937 = r446936 * r446936;
double r446938 = r446934 / r446937;
double r446939 = pow(r446938, r446922);
double r446940 = r446922 / r446936;
double r446941 = pow(r446940, r446922);
double r446942 = r446939 * r446941;
double r446943 = r446942 / r446922;
double r446944 = r446928 ? r446933 : r446943;
return r446944;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.2 |
| Herbie | 1.9 |
if x < -7.006483848542437 or 2.852199015031174e-14 < x Initial program 10.3
Simplified10.3
Taylor expanded around inf 0.5
Simplified0.5
if -7.006483848542437 < x < 2.852199015031174e-14Initial program 11.8
Simplified11.8
rmApplied add-cube-cbrt11.8
Applied *-un-lft-identity11.8
Applied times-frac11.8
Applied unpow-prod-down3.5
Final simplification1.9
herbie shell --seed 2019353 +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))