\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.81817434923962274 \cdot 10^{140} \lor \neg \left(x \le 5.23835627656106507 \cdot 10^{-4}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r508471 = x;
double r508472 = y;
double r508473 = r508471 + r508472;
double r508474 = r508471 / r508473;
double r508475 = log(r508474);
double r508476 = r508471 * r508475;
double r508477 = exp(r508476);
double r508478 = r508477 / r508471;
return r508478;
}
double f(double x, double y) {
double r508479 = x;
double r508480 = -1.8181743492396227e+140;
bool r508481 = r508479 <= r508480;
double r508482 = 0.0005238356276561065;
bool r508483 = r508479 <= r508482;
double r508484 = !r508483;
bool r508485 = r508481 || r508484;
double r508486 = y;
double r508487 = -r508486;
double r508488 = exp(r508487);
double r508489 = r508488 / r508479;
double r508490 = cbrt(r508479);
double r508491 = r508479 + r508486;
double r508492 = cbrt(r508491);
double r508493 = r508490 / r508492;
double r508494 = fabs(r508493);
double r508495 = pow(r508494, r508479);
double r508496 = r508495 * r508495;
double r508497 = pow(r508493, r508479);
double r508498 = r508496 * r508497;
double r508499 = r508498 / r508479;
double r508500 = r508485 ? r508489 : r508499;
return r508500;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.6 |
| Herbie | 0.7 |
if x < -1.8181743492396227e+140 or 0.0005238356276561065 < x Initial program 12.0
Simplified12.0
Taylor expanded around inf 0.2
if -1.8181743492396227e+140 < x < 0.0005238356276561065Initial program 10.5
Simplified10.5
rmApplied add-cube-cbrt17.5
Applied add-cube-cbrt10.5
Applied times-frac10.5
Applied unpow-prod-down3.0
rmApplied add-sqr-sqrt3.0
Applied unpow-prod-down3.0
Simplified3.0
Simplified1.1
Final simplification0.7
herbie shell --seed 2020046 +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))