\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -4.909420533601188 \cdot 10^{+97}:\\
\;\;\;\;\frac{1}{e^{y} \cdot x}\\
\mathbf{elif}\;x \le 11.69456786955557:\\
\;\;\;\;\frac{{\left(e^{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)}^{\left(\sqrt[3]{x} \cdot \log \left(\frac{x}{x + y}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r21317981 = x;
double r21317982 = y;
double r21317983 = r21317981 + r21317982;
double r21317984 = r21317981 / r21317983;
double r21317985 = log(r21317984);
double r21317986 = r21317981 * r21317985;
double r21317987 = exp(r21317986);
double r21317988 = r21317987 / r21317981;
return r21317988;
}
double f(double x, double y) {
double r21317989 = x;
double r21317990 = -4.909420533601188e+97;
bool r21317991 = r21317989 <= r21317990;
double r21317992 = 1.0;
double r21317993 = y;
double r21317994 = exp(r21317993);
double r21317995 = r21317994 * r21317989;
double r21317996 = r21317992 / r21317995;
double r21317997 = 11.69456786955557;
bool r21317998 = r21317989 <= r21317997;
double r21317999 = cbrt(r21317989);
double r21318000 = r21317999 * r21317999;
double r21318001 = exp(r21318000);
double r21318002 = r21317989 + r21317993;
double r21318003 = r21317989 / r21318002;
double r21318004 = log(r21318003);
double r21318005 = r21317999 * r21318004;
double r21318006 = pow(r21318001, r21318005);
double r21318007 = r21318006 / r21317989;
double r21318008 = -r21317993;
double r21318009 = exp(r21318008);
double r21318010 = r21318009 / r21317989;
double r21318011 = r21317998 ? r21318007 : r21318010;
double r21318012 = r21317991 ? r21317996 : r21318011;
return r21318012;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 7.9 |
| Herbie | 0.3 |
if x < -4.909420533601188e+97Initial program 15.2
Taylor expanded around inf 0.0
Simplified0.0
rmApplied exp-neg0.0
Applied associate-/l/0.0
if -4.909420533601188e+97 < x < 11.69456786955557Initial program 10.6
rmApplied add-log-exp17.7
Applied exp-to-pow0.6
rmApplied add-cube-cbrt0.6
Applied exp-prod0.6
Applied pow-pow0.5
if 11.69456786955557 < x Initial program 9.3
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.3
herbie shell --seed 2019168 +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))