\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.371891914955366 \cdot 10^{41} \lor \neg \left(x \le 6.5526303521982673 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r553107 = x;
double r553108 = y;
double r553109 = r553107 + r553108;
double r553110 = r553107 / r553109;
double r553111 = log(r553110);
double r553112 = r553107 * r553111;
double r553113 = exp(r553112);
double r553114 = r553113 / r553107;
return r553114;
}
double f(double x, double y) {
double r553115 = x;
double r553116 = -3.371891914955366e+41;
bool r553117 = r553115 <= r553116;
double r553118 = 6.552630352198267e-06;
bool r553119 = r553115 <= r553118;
double r553120 = !r553119;
bool r553121 = r553117 || r553120;
double r553122 = y;
double r553123 = -r553122;
double r553124 = exp(r553123);
double r553125 = r553124 / r553115;
double r553126 = cbrt(r553115);
double r553127 = r553115 + r553122;
double r553128 = cbrt(r553127);
double r553129 = r553126 / r553128;
double r553130 = fabs(r553129);
double r553131 = pow(r553130, r553115);
double r553132 = r553131 * r553131;
double r553133 = pow(r553129, r553115);
double r553134 = r553132 * r553133;
double r553135 = r553134 / r553115;
double r553136 = r553121 ? r553125 : r553135;
return r553136;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 8.2 |
| Herbie | 0.2 |
if x < -3.371891914955366e+41 or 6.552630352198267e-06 < x Initial program 11.0
Simplified11.0
Taylor expanded around inf 0.3
if -3.371891914955366e+41 < x < 6.552630352198267e-06Initial program 10.8
Simplified10.7
rmApplied add-cube-cbrt12.7
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.4
rmApplied add-sqr-sqrt2.4
Applied unpow-prod-down2.4
Simplified2.4
Simplified0.2
Final simplification0.2
herbie shell --seed 2020047
(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))