\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 14.3367817113127866690547307371161878109:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\left(\sqrt[3]{x} \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 r15506645 = x;
double r15506646 = y;
double r15506647 = r15506645 + r15506646;
double r15506648 = r15506645 / r15506647;
double r15506649 = log(r15506648);
double r15506650 = r15506645 * r15506649;
double r15506651 = exp(r15506650);
double r15506652 = r15506651 / r15506645;
return r15506652;
}
double f(double x, double y) {
double r15506653 = y;
double r15506654 = 14.336781711312787;
bool r15506655 = r15506653 <= r15506654;
double r15506656 = 1.0;
double r15506657 = x;
double r15506658 = r15506656 / r15506657;
double r15506659 = cbrt(r15506657);
double r15506660 = r15506659 * r15506659;
double r15506661 = r15506657 + r15506653;
double r15506662 = r15506659 / r15506661;
double r15506663 = r15506660 * r15506662;
double r15506664 = log(r15506663);
double r15506665 = r15506664 * r15506657;
double r15506666 = exp(r15506665);
double r15506667 = r15506666 / r15506657;
double r15506668 = r15506655 ? r15506658 : r15506667;
return r15506668;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.8 |
| Herbie | 6.9 |
if y < 14.336781711312787Initial program 4.6
Taylor expanded around inf 1.3
if 14.336781711312787 < y Initial program 32.9
rmApplied *-un-lft-identity32.9
Applied add-cube-cbrt24.5
Applied times-frac25.0
Simplified25.0
Final simplification6.9
herbie shell --seed 2019171 +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.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))