\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 r16713303 = x;
double r16713304 = y;
double r16713305 = r16713303 + r16713304;
double r16713306 = r16713303 / r16713305;
double r16713307 = log(r16713306);
double r16713308 = r16713303 * r16713307;
double r16713309 = exp(r16713308);
double r16713310 = r16713309 / r16713303;
return r16713310;
}
double f(double x, double y) {
double r16713311 = y;
double r16713312 = 5.639442099966964;
bool r16713313 = r16713311 <= r16713312;
double r16713314 = 1.0;
double r16713315 = x;
double r16713316 = r16713314 / r16713315;
double r16713317 = cbrt(r16713315);
double r16713318 = r16713317 * r16713317;
double r16713319 = cbrt(r16713318);
double r16713320 = cbrt(r16713317);
double r16713321 = r16713319 * r16713320;
double r16713322 = r16713321 * r16713317;
double r16713323 = r16713315 + r16713311;
double r16713324 = r16713317 / r16713323;
double r16713325 = r16713322 * r16713324;
double r16713326 = log(r16713325);
double r16713327 = r16713326 * r16713315;
double r16713328 = exp(r16713327);
double r16713329 = r16713328 / r16713315;
double r16713330 = r16713313 ? r16713316 : r16713329;
return r16713330;
}




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))