\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -0.0431690342714504613 \lor \neg \left(x \le 0.00118195873238271794\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(\log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right) + \log \left(\frac{x}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\end{array}double f(double x, double y) {
double r394879 = x;
double r394880 = y;
double r394881 = r394879 + r394880;
double r394882 = r394879 / r394881;
double r394883 = log(r394882);
double r394884 = r394879 * r394883;
double r394885 = exp(r394884);
double r394886 = r394885 / r394879;
return r394886;
}
double f(double x, double y) {
double r394887 = x;
double r394888 = -0.04316903427145046;
bool r394889 = r394887 <= r394888;
double r394890 = 0.001181958732382718;
bool r394891 = r394887 <= r394890;
double r394892 = !r394891;
bool r394893 = r394889 || r394892;
double r394894 = -1.0;
double r394895 = y;
double r394896 = r394894 * r394895;
double r394897 = exp(r394896);
double r394898 = r394897 / r394887;
double r394899 = 1.0;
double r394900 = r394887 + r394895;
double r394901 = cbrt(r394900);
double r394902 = r394901 * r394901;
double r394903 = r394899 / r394902;
double r394904 = log(r394903);
double r394905 = r394887 / r394901;
double r394906 = log(r394905);
double r394907 = r394904 + r394906;
double r394908 = r394887 * r394907;
double r394909 = exp(r394908);
double r394910 = r394909 / r394887;
double r394911 = r394893 ? r394898 : r394910;
return r394911;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.4 |
|---|---|
| Target | 8.5 |
| Herbie | 1.6 |
if x < -0.04316903427145046 or 0.001181958732382718 < x Initial program 11.5
Taylor expanded around inf 0.2
if -0.04316903427145046 < x < 0.001181958732382718Initial program 11.2
rmApplied add-cube-cbrt11.2
Applied *-un-lft-identity11.2
Applied times-frac11.2
Applied log-prod3.0
Final simplification1.6
herbie shell --seed 2020034
(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))