\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -9.6059130117611643 \cdot 10^{60} \lor \neg \left(x \le 18.070714455582099\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x}}{\frac{x}{{\left(\sqrt[3]{\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\sqrt[3]{\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r356486 = x;
double r356487 = y;
double r356488 = r356486 + r356487;
double r356489 = r356486 / r356488;
double r356490 = log(r356489);
double r356491 = r356486 * r356490;
double r356492 = exp(r356491);
double r356493 = r356492 / r356486;
return r356493;
}
double f(double x, double y) {
double r356494 = x;
double r356495 = -9.605913011761164e+60;
bool r356496 = r356494 <= r356495;
double r356497 = 18.0707144555821;
bool r356498 = r356494 <= r356497;
double r356499 = !r356498;
bool r356500 = r356496 || r356499;
double r356501 = -1.0;
double r356502 = y;
double r356503 = r356501 * r356502;
double r356504 = exp(r356503);
double r356505 = r356504 / r356494;
double r356506 = 2.0;
double r356507 = cbrt(r356494);
double r356508 = r356494 + r356502;
double r356509 = cbrt(r356508);
double r356510 = r356507 / r356509;
double r356511 = log(r356510);
double r356512 = r356506 * r356511;
double r356513 = r356512 * r356494;
double r356514 = exp(r356513);
double r356515 = cbrt(r356510);
double r356516 = r356515 * r356515;
double r356517 = pow(r356516, r356494);
double r356518 = pow(r356515, r356494);
double r356519 = r356517 * r356518;
double r356520 = r356494 / r356519;
double r356521 = r356514 / r356520;
double r356522 = r356500 ? r356505 : r356521;
return r356522;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.6 |
| Herbie | 0.1 |
if x < -9.605913011761164e+60 or 18.0707144555821 < x Initial program 12.3
Simplified12.3
Taylor expanded around inf 0.0
Simplified0.0
if -9.605913011761164e+60 < x < 18.0707144555821Initial program 10.1
Simplified10.1
rmApplied add-cube-cbrt13.1
Applied add-cube-cbrt10.1
Applied times-frac10.1
Applied unpow-prod-down2.3
Applied associate-/l*2.4
rmApplied add-exp-log36.0
Applied add-exp-log36.0
Applied prod-exp36.0
Applied add-exp-log36.0
Applied add-exp-log36.0
Applied prod-exp36.0
Applied div-exp36.0
Applied pow-exp34.9
Simplified0.2
rmApplied add-cube-cbrt0.2
Applied unpow-prod-down0.2
Final simplification0.1
herbie shell --seed 2020036 +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))