\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}{e^{y} \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r299279 = x;
double r299280 = y;
double r299281 = r299279 + r299280;
double r299282 = r299279 / r299281;
double r299283 = log(r299282);
double r299284 = r299279 * r299283;
double r299285 = exp(r299284);
double r299286 = r299285 / r299279;
return r299286;
}
double f(double x, double y) {
double r299287 = x;
double r299288 = -1.335604954605443e+135;
bool r299289 = r299287 <= r299288;
double r299290 = 2.859517489315194e-25;
bool r299291 = r299287 <= r299290;
double r299292 = !r299291;
bool r299293 = r299289 || r299292;
double r299294 = 1.0;
double r299295 = y;
double r299296 = exp(r299295);
double r299297 = r299296 * r299287;
double r299298 = r299294 / r299297;
double r299299 = cbrt(r299287);
double r299300 = r299287 + r299295;
double r299301 = cbrt(r299300);
double r299302 = r299299 / r299301;
double r299303 = pow(r299302, r299287);
double r299304 = r299303 * r299303;
double r299305 = r299287 / r299303;
double r299306 = r299304 / r299305;
double r299307 = r299293 ? r299298 : r299306;
return r299307;
}




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 clear-num1.0
Simplified1.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 times-frac3.0
Applied unpow-prod-down1.0
Final simplification1.0
herbie shell --seed 2019325
(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))