\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -6825213862164115456:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 19.70965259845290873386147723067551851273:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r302037 = x;
double r302038 = y;
double r302039 = r302037 + r302038;
double r302040 = r302037 / r302039;
double r302041 = log(r302040);
double r302042 = r302037 * r302041;
double r302043 = exp(r302042);
double r302044 = r302043 / r302037;
return r302044;
}
double f(double x, double y) {
double r302045 = x;
double r302046 = -6.825213862164115e+18;
bool r302047 = r302045 <= r302046;
double r302048 = 1.0;
double r302049 = y;
double r302050 = exp(r302049);
double r302051 = r302045 * r302050;
double r302052 = r302048 / r302051;
double r302053 = 19.70965259845291;
bool r302054 = r302045 <= r302053;
double r302055 = 2.0;
double r302056 = cbrt(r302045);
double r302057 = r302045 + r302049;
double r302058 = cbrt(r302057);
double r302059 = r302056 / r302058;
double r302060 = log(r302059);
double r302061 = r302055 * r302060;
double r302062 = r302061 * r302045;
double r302063 = r302045 * r302060;
double r302064 = r302062 + r302063;
double r302065 = exp(r302064);
double r302066 = r302065 / r302045;
double r302067 = -r302049;
double r302068 = exp(r302067);
double r302069 = r302068 / r302045;
double r302070 = r302054 ? r302066 : r302069;
double r302071 = r302047 ? r302052 : r302070;
return r302071;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.5 |
| Herbie | 0.0 |
if x < -6.825213862164115e+18Initial program 11.9
Taylor expanded around inf 0.0
Simplified0.0
rmApplied neg-sub00.0
Applied exp-diff0.0
Applied associate-/l/0.0
if -6.825213862164115e+18 < x < 19.70965259845291Initial program 11.2
rmApplied add-cube-cbrt11.8
Applied add-cube-cbrt11.2
Applied times-frac11.2
Applied log-prod2.3
Applied distribute-lft-in2.3
Simplified0.0
if 19.70965259845291 < x Initial program 10.2
Taylor expanded around inf 0.1
Simplified0.1
Final simplification0.0
herbie shell --seed 2019350 +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))