\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -9.0406218052466463 \cdot 10^{-16} \lor \neg \left(x \le 4.808874715698341 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\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 r339878 = x;
double r339879 = y;
double r339880 = r339878 + r339879;
double r339881 = r339878 / r339880;
double r339882 = log(r339881);
double r339883 = r339878 * r339882;
double r339884 = exp(r339883);
double r339885 = r339884 / r339878;
return r339885;
}
double f(double x, double y) {
double r339886 = x;
double r339887 = -9.040621805246646e-16;
bool r339888 = r339886 <= r339887;
double r339889 = 4.808874715698341e-10;
bool r339890 = r339886 <= r339889;
double r339891 = !r339890;
bool r339892 = r339888 || r339891;
double r339893 = -1.0;
double r339894 = y;
double r339895 = r339893 * r339894;
double r339896 = exp(r339895);
double r339897 = r339896 / r339886;
double r339898 = cbrt(r339886);
double r339899 = r339898 * r339898;
double r339900 = 1.0;
double r339901 = r339899 / r339900;
double r339902 = pow(r339901, r339886);
double r339903 = r339886 + r339894;
double r339904 = r339898 / r339903;
double r339905 = pow(r339904, r339886);
double r339906 = r339902 * r339905;
double r339907 = r339906 / r339886;
double r339908 = r339892 ? r339897 : r339907;
return r339908;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.1 |
| Herbie | 1.6 |
if x < -9.040621805246646e-16 or 4.808874715698341e-10 < x Initial program 10.7
Simplified10.7
Taylor expanded around inf 0.9
Simplified0.9
if -9.040621805246646e-16 < x < 4.808874715698341e-10Initial program 11.6
Simplified11.6
rmApplied *-un-lft-identity11.6
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down2.5
Final simplification1.6
herbie shell --seed 2020039 +o rules:numerics
(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))