\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -11.1311153737101254 \lor \neg \left(x \le 35.4023159063176607\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot \left({\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}\right)}{x}\\
\end{array}double f(double x, double y) {
double r303493 = x;
double r303494 = y;
double r303495 = r303493 + r303494;
double r303496 = r303493 / r303495;
double r303497 = log(r303496);
double r303498 = r303493 * r303497;
double r303499 = exp(r303498);
double r303500 = r303499 / r303493;
return r303500;
}
double f(double x, double y) {
double r303501 = x;
double r303502 = -11.131115373710125;
bool r303503 = r303501 <= r303502;
double r303504 = 35.40231590631766;
bool r303505 = r303501 <= r303504;
double r303506 = !r303505;
bool r303507 = r303503 || r303506;
double r303508 = y;
double r303509 = -r303508;
double r303510 = exp(r303509);
double r303511 = r303510 / r303501;
double r303512 = 1.0;
double r303513 = r303501 + r303508;
double r303514 = cbrt(r303513);
double r303515 = r303514 * r303514;
double r303516 = r303512 / r303515;
double r303517 = pow(r303516, r303501);
double r303518 = cbrt(r303501);
double r303519 = r303518 * r303518;
double r303520 = cbrt(r303514);
double r303521 = r303520 * r303520;
double r303522 = r303519 / r303521;
double r303523 = pow(r303522, r303501);
double r303524 = r303518 / r303520;
double r303525 = pow(r303524, r303501);
double r303526 = r303523 * r303525;
double r303527 = r303517 * r303526;
double r303528 = r303527 / r303501;
double r303529 = r303507 ? r303511 : r303528;
return r303529;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 7.9 |
| Herbie | 0.0 |
if x < -11.131115373710125 or 35.40231590631766 < x Initial program 10.9
Simplified10.9
Taylor expanded around inf 0.0
if -11.131115373710125 < x < 35.40231590631766Initial program 12.1
Simplified12.1
rmApplied add-cube-cbrt12.1
Applied *-un-lft-identity12.1
Applied times-frac12.1
Applied unpow-prod-down3.0
rmApplied add-cube-cbrt3.0
Applied add-cube-cbrt3.0
Applied times-frac3.0
Applied unpow-prod-down0.0
Final simplification0.0
herbie shell --seed 2019199 +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))