\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -5.12799110664252433 \cdot 10^{64}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 3.5038509428931215 \cdot 10^{-13}:\\
\;\;\;\;\frac{e^{\left(\log \left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right) + \log \left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)\right) \cdot x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\end{array}double f(double x, double y) {
double r1147732 = x;
double r1147733 = y;
double r1147734 = r1147732 + r1147733;
double r1147735 = r1147732 / r1147734;
double r1147736 = log(r1147735);
double r1147737 = r1147732 * r1147736;
double r1147738 = exp(r1147737);
double r1147739 = r1147738 / r1147732;
return r1147739;
}
double f(double x, double y) {
double r1147740 = x;
double r1147741 = -5.1279911066425243e+64;
bool r1147742 = r1147740 <= r1147741;
double r1147743 = y;
double r1147744 = -r1147743;
double r1147745 = exp(r1147744);
double r1147746 = r1147745 / r1147740;
double r1147747 = 3.5038509428931215e-13;
bool r1147748 = r1147740 <= r1147747;
double r1147749 = cbrt(r1147740);
double r1147750 = r1147740 + r1147743;
double r1147751 = cbrt(r1147750);
double r1147752 = r1147749 / r1147751;
double r1147753 = fabs(r1147752);
double r1147754 = log(r1147753);
double r1147755 = r1147754 + r1147754;
double r1147756 = r1147755 * r1147740;
double r1147757 = exp(r1147756);
double r1147758 = pow(r1147752, r1147740);
double r1147759 = r1147740 / r1147758;
double r1147760 = r1147757 / r1147759;
double r1147761 = 1.0;
double r1147762 = exp(r1147743);
double r1147763 = r1147740 * r1147762;
double r1147764 = r1147761 / r1147763;
double r1147765 = r1147748 ? r1147760 : r1147764;
double r1147766 = r1147742 ? r1147746 : r1147765;
return r1147766;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.9 |
| Herbie | 0.4 |
if x < -5.1279911066425243e+64Initial program 13.6
Taylor expanded around inf 0.0
Simplified0.0
if -5.1279911066425243e+64 < x < 3.5038509428931215e-13Initial program 10.7
rmApplied add-cube-cbrt14.2
Applied add-cube-cbrt10.7
Applied times-frac10.7
Applied log-prod2.4
Applied distribute-rgt-in2.4
Applied exp-sum2.4
Applied associate-/l*2.4
Simplified2.4
rmApplied add-sqr-sqrt2.4
Applied log-prod2.4
Simplified2.4
Simplified0.2
if 3.5038509428931215e-13 < x Initial program 9.3
Taylor expanded around inf 0.9
Simplified0.9
rmApplied clear-num0.9
Simplified0.9
Final simplification0.4
herbie shell --seed 2019198
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))