\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}:\\
\;\;\;\;e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r296439 = x;
double r296440 = y;
double r296441 = r296439 + r296440;
double r296442 = r296439 / r296441;
double r296443 = log(r296442);
double r296444 = r296439 * r296443;
double r296445 = exp(r296444);
double r296446 = r296445 / r296439;
return r296446;
}
double f(double x, double y) {
double r296447 = x;
double r296448 = -1.335604954605443e+135;
bool r296449 = r296447 <= r296448;
double r296450 = 2.859517489315194e-25;
bool r296451 = r296447 <= r296450;
double r296452 = !r296451;
bool r296453 = r296449 || r296452;
double r296454 = 1.0;
double r296455 = y;
double r296456 = exp(r296455);
double r296457 = r296456 * r296447;
double r296458 = r296454 / r296457;
double r296459 = 2.0;
double r296460 = cbrt(r296447);
double r296461 = r296447 + r296455;
double r296462 = cbrt(r296461);
double r296463 = r296460 / r296462;
double r296464 = log(r296463);
double r296465 = r296459 * r296464;
double r296466 = r296465 * r296447;
double r296467 = exp(r296466);
double r296468 = pow(r296463, r296447);
double r296469 = r296468 / r296447;
double r296470 = r296467 * r296469;
double r296471 = r296453 ? r296458 : r296470;
return r296471;
}




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
Simplified1.0
if -1.335604954605443e+135 < x < 2.859517489315194e-25Initial program 10.9
Simplified10.9
rmApplied *-un-lft-identity10.9
Applied add-cube-cbrt17.8
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied unpow-prod-down3.0
Applied times-frac3.0
Simplified3.0
rmApplied add-exp-log39.9
Applied add-exp-log39.9
Applied prod-exp39.9
Applied add-exp-log39.9
Applied add-exp-log39.9
Applied prod-exp39.9
Applied div-exp39.9
Applied pow-exp38.8
Simplified1.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))