\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -5.12799110664252433 \cdot 10^{64}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 3.5038509428931215 \cdot 10^{-13}:\\
\;\;\;\;\frac{e^{\left(\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) - \log \left(\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}\right)\right) \cdot x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\end{array}double f(double x, double y) {
double r290417 = x;
double r290418 = y;
double r290419 = r290417 + r290418;
double r290420 = r290417 / r290419;
double r290421 = log(r290420);
double r290422 = r290417 * r290421;
double r290423 = exp(r290422);
double r290424 = r290423 / r290417;
return r290424;
}
double f(double x, double y) {
double r290425 = x;
double r290426 = -5.1279911066425243e+64;
bool r290427 = r290425 <= r290426;
double r290428 = y;
double r290429 = -r290428;
double r290430 = exp(r290429);
double r290431 = r290430 / r290425;
double r290432 = 3.5038509428931215e-13;
bool r290433 = r290425 <= r290432;
double r290434 = cbrt(r290425);
double r290435 = r290434 * r290434;
double r290436 = log(r290435);
double r290437 = r290425 + r290428;
double r290438 = cbrt(r290437);
double r290439 = r290438 * r290438;
double r290440 = log(r290439);
double r290441 = r290436 - r290440;
double r290442 = r290441 * r290425;
double r290443 = exp(r290442);
double r290444 = r290434 / r290438;
double r290445 = pow(r290444, r290425);
double r290446 = r290425 / r290445;
double r290447 = r290443 / r290446;
double r290448 = 1.0;
double r290449 = exp(r290428);
double r290450 = r290425 * r290449;
double r290451 = r290448 / r290450;
double r290452 = r290433 ? r290447 : r290451;
double r290453 = r290427 ? r290431 : r290452;
return r290453;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.9 |
| Herbie | 0.4 |
if x < -5.1279911066425243e+64Initial program 13.6
Taylor expanded around inf 0.0
Simplified0.0
if -5.1279911066425243e+64 < x < 3.5038509428931215e-13Initial program 10.7
rmApplied add-cube-cbrt14.2
Applied add-cube-cbrt10.7
Applied times-frac10.7
Applied log-prod2.4
Applied distribute-rgt-in2.4
Applied exp-sum2.4
Applied associate-/l*2.4
Simplified2.4
rmApplied add-exp-log6.3
Applied add-exp-log2.4
Applied div-exp2.4
Applied rem-log-exp0.2
if 3.5038509428931215e-13 < x Initial program 9.3
Taylor expanded around inf 0.9
Simplified0.9
rmApplied neg-sub00.9
Applied exp-diff0.9
Applied associate-/l/0.9
Final simplification0.4
herbie shell --seed 2019198 +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.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))