\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.10353378791938817 \cdot 10^{36}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 4.808874715698341 \cdot 10^{-10}:\\
\;\;\;\;\frac{e^{\sqrt[3]{{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}^{3}} \cdot x}}{\frac{x}{\frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\end{array}double f(double x, double y) {
double r435582 = x;
double r435583 = y;
double r435584 = r435582 + r435583;
double r435585 = r435582 / r435584;
double r435586 = log(r435585);
double r435587 = r435582 * r435586;
double r435588 = exp(r435587);
double r435589 = r435588 / r435582;
return r435589;
}
double f(double x, double y) {
double r435590 = x;
double r435591 = -1.1035337879193882e+36;
bool r435592 = r435590 <= r435591;
double r435593 = 1.0;
double r435594 = y;
double r435595 = exp(r435594);
double r435596 = r435590 * r435595;
double r435597 = r435593 / r435596;
double r435598 = 4.808874715698341e-10;
bool r435599 = r435590 <= r435598;
double r435600 = 2.0;
double r435601 = cbrt(r435590);
double r435602 = r435590 + r435594;
double r435603 = cbrt(r435602);
double r435604 = r435601 / r435603;
double r435605 = log(r435604);
double r435606 = r435600 * r435605;
double r435607 = 3.0;
double r435608 = pow(r435606, r435607);
double r435609 = cbrt(r435608);
double r435610 = r435609 * r435590;
double r435611 = exp(r435610);
double r435612 = pow(r435604, r435590);
double r435613 = r435612 / r435593;
double r435614 = r435590 / r435613;
double r435615 = r435611 / r435614;
double r435616 = -1.0;
double r435617 = r435616 * r435594;
double r435618 = exp(r435617);
double r435619 = r435618 / r435590;
double r435620 = r435599 ? r435615 : r435619;
double r435621 = r435592 ? r435597 : r435620;
return r435621;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.1 |
| Herbie | 0.2 |
if x < -1.1035337879193882e+36Initial program 14.4
Taylor expanded around inf 0.1
rmApplied clear-num0.1
Simplified0.1
if -1.1035337879193882e+36 < x < 4.808874715698341e-10Initial program 10.8
rmApplied add-cube-cbrt12.6
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied log-prod1.9
Applied distribute-rgt-in1.9
Applied exp-sum1.9
Applied associate-/l*1.9
Simplified1.9
rmApplied add-cbrt-cube1.9
Simplified0.1
if 4.808874715698341e-10 < x Initial program 9.2
Taylor expanded around inf 0.5
Final simplification0.2
herbie shell --seed 2020039
(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))