\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -5.595667354331363974040414177579805254936 \lor \neg \left(x \le 1.285210522973264513379749052895961725085 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{x + y}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r542859 = x;
double r542860 = y;
double r542861 = r542859 + r542860;
double r542862 = r542859 / r542861;
double r542863 = log(r542862);
double r542864 = r542859 * r542863;
double r542865 = exp(r542864);
double r542866 = r542865 / r542859;
return r542866;
}
double f(double x, double y) {
double r542867 = x;
double r542868 = -5.595667354331364;
bool r542869 = r542867 <= r542868;
double r542870 = 1.2852105229732645e-08;
bool r542871 = r542867 <= r542870;
double r542872 = !r542871;
bool r542873 = r542869 || r542872;
double r542874 = 1.0;
double r542875 = y;
double r542876 = exp(r542875);
double r542877 = r542867 * r542876;
double r542878 = r542874 / r542877;
double r542879 = cbrt(r542867);
double r542880 = r542879 * r542879;
double r542881 = r542880 / r542874;
double r542882 = pow(r542881, r542867);
double r542883 = r542867 + r542875;
double r542884 = r542879 / r542883;
double r542885 = pow(r542884, r542867);
double r542886 = r542882 * r542885;
double r542887 = r542886 / r542867;
double r542888 = r542873 ? r542878 : r542887;
return r542888;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.0 |
| Herbie | 1.8 |
if x < -5.595667354331364 or 1.2852105229732645e-08 < x Initial program 11.0
Simplified11.0
Taylor expanded around inf 0.4
Simplified0.4
rmApplied clear-num0.4
Simplified0.4
if -5.595667354331364 < x < 1.2852105229732645e-08Initial program 11.6
Simplified11.6
rmApplied *-un-lft-identity11.6
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down3.3
Final simplification1.8
herbie shell --seed 2019362
(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))