\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.122144077215159 \cdot 10^{+68}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 12.791495951037414:\\
\;\;\;\;\frac{\frac{1}{x}}{e^{x \cdot \left(\log \left(\frac{\sqrt[3]{y + x}}{\sqrt[3]{x}}\right) + \log \left(\frac{\sqrt[3]{y + x}}{\sqrt[3]{x}}\right)\right)}} \cdot e^{\log \left(\frac{\sqrt[3]{y + x}}{\sqrt[3]{x}}\right) \cdot \left(-x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r7285591 = x;
double r7285592 = y;
double r7285593 = r7285591 + r7285592;
double r7285594 = r7285591 / r7285593;
double r7285595 = log(r7285594);
double r7285596 = r7285591 * r7285595;
double r7285597 = exp(r7285596);
double r7285598 = r7285597 / r7285591;
return r7285598;
}
double f(double x, double y) {
double r7285599 = x;
double r7285600 = -2.122144077215159e+68;
bool r7285601 = r7285599 <= r7285600;
double r7285602 = y;
double r7285603 = -r7285602;
double r7285604 = exp(r7285603);
double r7285605 = r7285604 / r7285599;
double r7285606 = 12.791495951037414;
bool r7285607 = r7285599 <= r7285606;
double r7285608 = 1.0;
double r7285609 = r7285608 / r7285599;
double r7285610 = r7285602 + r7285599;
double r7285611 = cbrt(r7285610);
double r7285612 = cbrt(r7285599);
double r7285613 = r7285611 / r7285612;
double r7285614 = log(r7285613);
double r7285615 = r7285614 + r7285614;
double r7285616 = r7285599 * r7285615;
double r7285617 = exp(r7285616);
double r7285618 = r7285609 / r7285617;
double r7285619 = -r7285599;
double r7285620 = r7285614 * r7285619;
double r7285621 = exp(r7285620);
double r7285622 = r7285618 * r7285621;
double r7285623 = r7285607 ? r7285622 : r7285605;
double r7285624 = r7285601 ? r7285605 : r7285623;
return r7285624;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
if x < -2.122144077215159e+68 or 12.791495951037414 < x Initial program 11.3
Taylor expanded around inf 0.0
Simplified0.0
if -2.122144077215159e+68 < x < 12.791495951037414Initial program 10.4
rmApplied clear-num11.4
Applied log-rec11.4
Applied distribute-rgt-neg-out11.4
Applied exp-neg11.5
Applied associate-/l/11.4
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt11.5
Applied times-frac11.5
Applied log-prod3.5
Applied distribute-lft-in3.5
Applied exp-sum3.5
Applied associate-*r*3.5
Applied add-cube-cbrt3.5
Applied times-frac3.5
Simplified0.4
Simplified0.4
Final simplification0.2
herbie shell --seed 2019158
(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))