\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.335604954605443015390054065360569803049 \cdot 10^{135} \lor \neg \left(x \le 2.859517489315194049442510563430033342003 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\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}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r228185 = x;
double r228186 = y;
double r228187 = r228185 + r228186;
double r228188 = r228185 / r228187;
double r228189 = log(r228188);
double r228190 = r228185 * r228189;
double r228191 = exp(r228190);
double r228192 = r228191 / r228185;
return r228192;
}
double f(double x, double y) {
double r228193 = x;
double r228194 = -1.335604954605443e+135;
bool r228195 = r228193 <= r228194;
double r228196 = 2.859517489315194e-25;
bool r228197 = r228193 <= r228196;
double r228198 = !r228197;
bool r228199 = r228195 || r228198;
double r228200 = 1.0;
double r228201 = y;
double r228202 = exp(r228201);
double r228203 = r228193 * r228202;
double r228204 = r228200 / r228203;
double r228205 = cbrt(r228193);
double r228206 = r228193 + r228201;
double r228207 = cbrt(r228206);
double r228208 = r228205 / r228207;
double r228209 = fabs(r228208);
double r228210 = pow(r228209, r228193);
double r228211 = r228210 * r228210;
double r228212 = pow(r228208, r228193);
double r228213 = r228193 / r228212;
double r228214 = r228211 / r228213;
double r228215 = r228199 ? r228204 : r228214;
return r228215;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.9 |
| Herbie | 1.0 |
if x < -1.335604954605443e+135 or 2.859517489315194e-25 < x Initial program 10.9
Simplified10.9
Taylor expanded around inf 1.0
rmApplied neg-sub01.0
Applied exp-diff1.0
Applied associate-/l/1.0
if -1.335604954605443e+135 < x < 2.859517489315194e-25Initial program 10.9
Simplified10.9
rmApplied add-cube-cbrt17.8
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied unpow-prod-down3.0
Applied associate-/l*3.0
rmApplied add-sqr-sqrt3.0
Applied unpow-prod-down3.0
Simplified3.0
Simplified1.0
Final simplification1.0
herbie shell --seed 2019325 +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))