\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -393843933133852459536098286829421199360 \lor \neg \left(x \le 4.395331218668958150885828217724338173866\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r303744 = x;
double r303745 = y;
double r303746 = r303744 + r303745;
double r303747 = r303744 / r303746;
double r303748 = log(r303747);
double r303749 = r303744 * r303748;
double r303750 = exp(r303749);
double r303751 = r303750 / r303744;
return r303751;
}
double f(double x, double y) {
double r303752 = x;
double r303753 = -3.9384393313385246e+38;
bool r303754 = r303752 <= r303753;
double r303755 = 4.395331218668958;
bool r303756 = r303752 <= r303755;
double r303757 = !r303756;
bool r303758 = r303754 || r303757;
double r303759 = -1.0;
double r303760 = y;
double r303761 = r303759 * r303760;
double r303762 = exp(r303761);
double r303763 = r303762 / r303752;
double r303764 = 2.0;
double r303765 = cbrt(r303752);
double r303766 = r303752 + r303760;
double r303767 = cbrt(r303766);
double r303768 = r303765 / r303767;
double r303769 = log(r303768);
double r303770 = r303764 * r303769;
double r303771 = r303770 * r303752;
double r303772 = exp(r303771);
double r303773 = pow(r303768, r303752);
double r303774 = r303752 / r303773;
double r303775 = r303772 / r303774;
double r303776 = r303758 ? r303763 : r303775;
return r303776;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.2 |
| Herbie | 0.1 |
if x < -3.9384393313385246e+38 or 4.395331218668958 < x Initial program 11.6
Simplified11.6
Taylor expanded around inf 0.1
Simplified0.1
if -3.9384393313385246e+38 < x < 4.395331218668958Initial program 11.3
Simplified11.3
rmApplied add-cube-cbrt13.4
Applied add-cube-cbrt11.3
Applied times-frac11.3
Applied unpow-prod-down1.7
Applied associate-/l*1.7
rmApplied add-exp-log34.3
Applied add-exp-log34.3
Applied prod-exp34.3
Applied add-exp-log34.3
Applied add-exp-log34.3
Applied prod-exp34.3
Applied div-exp34.3
Applied pow-exp33.5
Simplified0.1
Final simplification0.1
herbie shell --seed 2019308
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.73118442066479561e94) (/ (exp (/ -1 y)) x) (if (< y 2.81795924272828789e37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))