\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -16.17024727004499240479162835981696844101:\\
\;\;\;\;\sqrt{e^{-y}} \cdot \frac{\sqrt{e^{-y}}}{x}\\
\mathbf{elif}\;x \le 8.114686302170449394566276168916374444962:\\
\;\;\;\;\frac{{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{x + y}\right)}^{x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{e^{-y}}} \cdot \frac{{\left(\sqrt{\sqrt{e^{-y}}}\right)}^{3}}{x}\\
\end{array}double f(double x, double y) {
double r261435 = x;
double r261436 = y;
double r261437 = r261435 + r261436;
double r261438 = r261435 / r261437;
double r261439 = log(r261438);
double r261440 = r261435 * r261439;
double r261441 = exp(r261440);
double r261442 = r261441 / r261435;
return r261442;
}
double f(double x, double y) {
double r261443 = x;
double r261444 = -16.170247270044992;
bool r261445 = r261443 <= r261444;
double r261446 = y;
double r261447 = -r261446;
double r261448 = exp(r261447);
double r261449 = sqrt(r261448);
double r261450 = r261449 / r261443;
double r261451 = r261449 * r261450;
double r261452 = 8.11468630217045;
bool r261453 = r261443 <= r261452;
double r261454 = cbrt(r261443);
double r261455 = r261454 * r261454;
double r261456 = pow(r261455, r261443);
double r261457 = r261443 + r261446;
double r261458 = r261454 / r261457;
double r261459 = pow(r261458, r261443);
double r261460 = r261443 / r261459;
double r261461 = r261456 / r261460;
double r261462 = sqrt(r261449);
double r261463 = 3.0;
double r261464 = pow(r261462, r261463);
double r261465 = r261464 / r261443;
double r261466 = r261462 * r261465;
double r261467 = r261453 ? r261461 : r261466;
double r261468 = r261445 ? r261451 : r261467;
return r261468;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.2 |
| Herbie | 1.8 |
if x < -16.170247270044992Initial program 11.5
Simplified11.5
Taylor expanded around inf 0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
if -16.170247270044992 < x < 8.11468630217045Initial program 12.3
Simplified12.3
rmApplied *-un-lft-identity12.3
Applied add-cube-cbrt12.3
Applied times-frac12.3
Applied unpow-prod-down3.7
Applied associate-/l*3.7
if 8.11468630217045 < x Initial program 10.3
Simplified10.3
Taylor expanded around inf 0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied sqrt-prod0.1
Applied associate-*l*0.1
Simplified0.1
Final simplification1.8
herbie shell --seed 2019322 +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))