\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -338166549708266081878016 \lor \neg \left(x \le 5.105764663642184685065153471050791722519 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) \cdot 2\right) \cdot x}}{\frac{x}{{\left(\sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}}\right)}^{x} \cdot {\left(\sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r337194 = x;
double r337195 = y;
double r337196 = r337194 + r337195;
double r337197 = r337194 / r337196;
double r337198 = log(r337197);
double r337199 = r337194 * r337198;
double r337200 = exp(r337199);
double r337201 = r337200 / r337194;
return r337201;
}
double f(double x, double y) {
double r337202 = x;
double r337203 = -3.381665497082661e+23;
bool r337204 = r337202 <= r337203;
double r337205 = 5.105764663642185e-05;
bool r337206 = r337202 <= r337205;
double r337207 = !r337206;
bool r337208 = r337204 || r337207;
double r337209 = y;
double r337210 = -r337209;
double r337211 = exp(r337210);
double r337212 = r337211 / r337202;
double r337213 = cbrt(r337202);
double r337214 = r337209 + r337202;
double r337215 = cbrt(r337214);
double r337216 = r337213 / r337215;
double r337217 = log(r337216);
double r337218 = 2.0;
double r337219 = r337217 * r337218;
double r337220 = r337219 * r337202;
double r337221 = exp(r337220);
double r337222 = sqrt(r337216);
double r337223 = pow(r337222, r337202);
double r337224 = r337223 * r337223;
double r337225 = r337202 / r337224;
double r337226 = r337221 / r337225;
double r337227 = r337208 ? r337212 : r337226;
return r337227;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.6 |
|---|---|
| Target | 8.2 |
| Herbie | 0.2 |
if x < -3.381665497082661e+23 or 5.105764663642185e-05 < x Initial program 11.6
Simplified11.6
Taylor expanded around inf 0.3
if -3.381665497082661e+23 < x < 5.105764663642185e-05Initial program 11.6
Simplified11.6
rmApplied add-cube-cbrt12.4
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down2.3
Applied associate-/l*2.3
rmApplied add-exp-log34.2
Applied add-exp-log34.2
Applied prod-exp34.2
Applied add-exp-log34.2
Applied add-exp-log34.2
Applied prod-exp34.2
Applied div-exp34.2
Applied pow-exp33.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied unpow-prod-down0.1
Final simplification0.2
herbie shell --seed 2019174
(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))