\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 r336919 = x;
double r336920 = y;
double r336921 = r336919 + r336920;
double r336922 = r336919 / r336921;
double r336923 = log(r336922);
double r336924 = r336919 * r336923;
double r336925 = exp(r336924);
double r336926 = r336925 / r336919;
return r336926;
}
double f(double x, double y) {
double r336927 = x;
double r336928 = -0.007318084080355909;
bool r336929 = r336927 <= r336928;
double r336930 = 7.905402982476204;
bool r336931 = r336927 <= r336930;
double r336932 = !r336931;
bool r336933 = r336929 || r336932;
double r336934 = -1.0;
double r336935 = y;
double r336936 = r336934 * r336935;
double r336937 = exp(r336936);
double r336938 = r336937 / r336927;
double r336939 = 1.0;
double r336940 = r336927 + r336935;
double r336941 = cbrt(r336940);
double r336942 = r336941 * r336941;
double r336943 = r336939 / r336942;
double r336944 = pow(r336943, r336927);
double r336945 = cbrt(r336942);
double r336946 = r336939 / r336945;
double r336947 = pow(r336946, r336927);
double r336948 = cbrt(r336941);
double r336949 = r336927 / r336948;
double r336950 = pow(r336949, r336927);
double r336951 = r336947 * r336950;
double r336952 = r336944 * r336951;
double r336953 = r336952 / r336927;
double r336954 = r336933 ? r336938 : r336953;
return r336954;
}




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 +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))