\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 5.639442099966964:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\left(\left(\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{x + y}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r16153135 = x;
double r16153136 = y;
double r16153137 = r16153135 + r16153136;
double r16153138 = r16153135 / r16153137;
double r16153139 = log(r16153138);
double r16153140 = r16153135 * r16153139;
double r16153141 = exp(r16153140);
double r16153142 = r16153141 / r16153135;
return r16153142;
}
double f(double x, double y) {
double r16153143 = y;
double r16153144 = 5.639442099966964;
bool r16153145 = r16153143 <= r16153144;
double r16153146 = 1.0;
double r16153147 = x;
double r16153148 = r16153146 / r16153147;
double r16153149 = cbrt(r16153147);
double r16153150 = r16153149 * r16153149;
double r16153151 = cbrt(r16153150);
double r16153152 = cbrt(r16153149);
double r16153153 = r16153151 * r16153152;
double r16153154 = r16153153 * r16153149;
double r16153155 = r16153147 + r16153143;
double r16153156 = r16153149 / r16153155;
double r16153157 = r16153154 * r16153156;
double r16153158 = log(r16153157);
double r16153159 = r16153158 * r16153147;
double r16153160 = exp(r16153159);
double r16153161 = r16153160 / r16153147;
double r16153162 = r16153145 ? r16153148 : r16153161;
return r16153162;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.9 |
| Herbie | 7.0 |
if y < 5.639442099966964Initial program 4.5
Taylor expanded around inf 1.2
if 5.639442099966964 < y Initial program 33.3
rmApplied *-un-lft-identity33.3
Applied add-cube-cbrt25.6
Applied times-frac25.5
Simplified25.5
rmApplied add-cube-cbrt25.7
Applied cbrt-prod25.6
Final simplification7.0
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))