\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -0.00731808408035590930024172351409106340725 \lor \neg \left(x \le 7.905402982476203987971530295908451080322\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot \left({\left(\frac{1}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{x}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}\right)}{x}\\
\end{array}double f(double x, double y) {
double r470869 = x;
double r470870 = y;
double r470871 = r470869 + r470870;
double r470872 = r470869 / r470871;
double r470873 = log(r470872);
double r470874 = r470869 * r470873;
double r470875 = exp(r470874);
double r470876 = r470875 / r470869;
return r470876;
}
double f(double x, double y) {
double r470877 = x;
double r470878 = -0.007318084080355909;
bool r470879 = r470877 <= r470878;
double r470880 = 7.905402982476204;
bool r470881 = r470877 <= r470880;
double r470882 = !r470881;
bool r470883 = r470879 || r470882;
double r470884 = -1.0;
double r470885 = y;
double r470886 = r470884 * r470885;
double r470887 = exp(r470886);
double r470888 = r470887 / r470877;
double r470889 = 1.0;
double r470890 = r470877 + r470885;
double r470891 = cbrt(r470890);
double r470892 = r470891 * r470891;
double r470893 = r470889 / r470892;
double r470894 = pow(r470893, r470877);
double r470895 = cbrt(r470892);
double r470896 = r470889 / r470895;
double r470897 = pow(r470896, r470877);
double r470898 = cbrt(r470891);
double r470899 = r470877 / r470898;
double r470900 = pow(r470899, r470877);
double r470901 = r470897 * r470900;
double r470902 = r470894 * r470901;
double r470903 = r470902 / r470877;
double r470904 = r470883 ? r470888 : r470903;
return r470904;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.4 |
|---|---|
| Target | 8.0 |
| Herbie | 0.3 |
if x < -0.007318084080355909 or 7.905402982476204 < x Initial program 10.8
Simplified10.8
Taylor expanded around inf 0.2
Simplified0.2
if -0.007318084080355909 < x < 7.905402982476204Initial program 12.0
Simplified12.0
rmApplied add-cube-cbrt12.0
Applied *-un-lft-identity12.0
Applied times-frac12.0
Applied unpow-prod-down3.0
rmApplied add-cube-cbrt3.0
Applied cbrt-prod3.0
Applied *-un-lft-identity3.0
Applied times-frac3.0
Applied unpow-prod-down0.4
Final simplification0.3
herbie shell --seed 2019354
(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))