\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -4.909420533601188 \cdot 10^{+97}:\\
\;\;\;\;\frac{1}{e^{y} \cdot x}\\
\mathbf{elif}\;x \le 11.69456786955557:\\
\;\;\;\;\frac{{\left(e^{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)}^{\left(\sqrt[3]{x} \cdot \log \left(\frac{x}{x + y}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r21834465 = x;
double r21834466 = y;
double r21834467 = r21834465 + r21834466;
double r21834468 = r21834465 / r21834467;
double r21834469 = log(r21834468);
double r21834470 = r21834465 * r21834469;
double r21834471 = exp(r21834470);
double r21834472 = r21834471 / r21834465;
return r21834472;
}
double f(double x, double y) {
double r21834473 = x;
double r21834474 = -4.909420533601188e+97;
bool r21834475 = r21834473 <= r21834474;
double r21834476 = 1.0;
double r21834477 = y;
double r21834478 = exp(r21834477);
double r21834479 = r21834478 * r21834473;
double r21834480 = r21834476 / r21834479;
double r21834481 = 11.69456786955557;
bool r21834482 = r21834473 <= r21834481;
double r21834483 = cbrt(r21834473);
double r21834484 = r21834483 * r21834483;
double r21834485 = exp(r21834484);
double r21834486 = r21834473 + r21834477;
double r21834487 = r21834473 / r21834486;
double r21834488 = log(r21834487);
double r21834489 = r21834483 * r21834488;
double r21834490 = pow(r21834485, r21834489);
double r21834491 = r21834490 / r21834473;
double r21834492 = -r21834477;
double r21834493 = exp(r21834492);
double r21834494 = r21834493 / r21834473;
double r21834495 = r21834482 ? r21834491 : r21834494;
double r21834496 = r21834475 ? r21834480 : r21834495;
return r21834496;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 7.9 |
| Herbie | 0.3 |
if x < -4.909420533601188e+97Initial program 15.2
Taylor expanded around inf 0.0
Simplified0.0
rmApplied clear-num0.0
Simplified0.0
if -4.909420533601188e+97 < x < 11.69456786955557Initial program 10.6
rmApplied add-log-exp17.7
Applied exp-to-pow0.6
rmApplied add-cube-cbrt0.6
Applied exp-prod0.6
Applied pow-pow0.5
if 11.69456786955557 < x Initial program 9.3
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.3
herbie shell --seed 2019168
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))