\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.9722026627658497 \cdot 10^{40} \lor \neg \left(x \le 0.0031732446158843622\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r401090 = x;
double r401091 = y;
double r401092 = r401090 + r401091;
double r401093 = r401090 / r401092;
double r401094 = log(r401093);
double r401095 = r401090 * r401094;
double r401096 = exp(r401095);
double r401097 = r401096 / r401090;
return r401097;
}
double f(double x, double y) {
double r401098 = x;
double r401099 = -3.9722026627658497e+40;
bool r401100 = r401098 <= r401099;
double r401101 = 0.003173244615884362;
bool r401102 = r401098 <= r401101;
double r401103 = !r401102;
bool r401104 = r401100 || r401103;
double r401105 = -1.0;
double r401106 = y;
double r401107 = r401105 * r401106;
double r401108 = exp(r401107);
double r401109 = r401108 / r401098;
double r401110 = cbrt(r401098);
double r401111 = r401098 + r401106;
double r401112 = cbrt(r401111);
double r401113 = r401110 / r401112;
double r401114 = fabs(r401113);
double r401115 = 2.0;
double r401116 = r401098 / r401115;
double r401117 = r401115 * r401116;
double r401118 = pow(r401114, r401117);
double r401119 = r401118 * r401118;
double r401120 = pow(r401113, r401098);
double r401121 = r401098 / r401120;
double r401122 = r401119 / r401121;
double r401123 = r401104 ? r401109 : r401122;
return r401123;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.2 |
| Herbie | 0.1 |
if x < -3.9722026627658497e+40 or 0.003173244615884362 < x Initial program 11.2
Simplified11.2
Taylor expanded around inf 0.1
Simplified0.1
if -3.9722026627658497e+40 < x < 0.003173244615884362Initial program 10.8
Simplified10.8
rmApplied add-cube-cbrt12.7
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.3
Applied associate-/l*2.3
rmApplied add-sqr-sqrt2.3
Applied unpow-prod-down2.3
Simplified2.3
Simplified0.2
Final simplification0.1
herbie shell --seed 2020083
(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))