\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.782408069109436113491121240500612211051 \cdot 10^{86} \lor \neg \left(x \le 1719139.2202338078059256076812744140625\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}}{\sqrt[3]{y + x}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r280578 = x;
double r280579 = y;
double r280580 = r280578 + r280579;
double r280581 = r280578 / r280580;
double r280582 = log(r280581);
double r280583 = r280578 * r280582;
double r280584 = exp(r280583);
double r280585 = r280584 / r280578;
return r280585;
}
double f(double x, double y) {
double r280586 = x;
double r280587 = -1.782408069109436e+86;
bool r280588 = r280586 <= r280587;
double r280589 = 1719139.2202338078;
bool r280590 = r280586 <= r280589;
double r280591 = !r280590;
bool r280592 = r280588 || r280591;
double r280593 = y;
double r280594 = -r280593;
double r280595 = exp(r280594);
double r280596 = r280595 / r280586;
double r280597 = cbrt(r280586);
double r280598 = r280593 + r280586;
double r280599 = cbrt(r280598);
double r280600 = r280597 / r280599;
double r280601 = r280597 * r280600;
double r280602 = r280601 / r280599;
double r280603 = pow(r280602, r280586);
double r280604 = pow(r280600, r280586);
double r280605 = r280603 * r280604;
double r280606 = r280605 / r280586;
double r280607 = r280592 ? r280596 : r280606;
return r280607;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.9 |
| Herbie | 1.3 |
if x < -1.782408069109436e+86 or 1719139.2202338078 < x Initial program 11.4
Simplified11.4
Taylor expanded around inf 0.0
if -1.782408069109436e+86 < x < 1719139.2202338078Initial program 10.8
Simplified10.8
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.4
Simplified2.4
Simplified2.4
Final simplification1.3
herbie shell --seed 2019179 +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))