\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.15064441356617753 \lor \neg \left(x \le 6.441277885744034\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot x\right) \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\sqrt[3]{x}}\\
\end{array}double f(double x, double y) {
double r669924 = x;
double r669925 = y;
double r669926 = r669924 + r669925;
double r669927 = r669924 / r669926;
double r669928 = log(r669927);
double r669929 = r669924 * r669928;
double r669930 = exp(r669929);
double r669931 = r669930 / r669924;
return r669931;
}
double f(double x, double y) {
double r669932 = x;
double r669933 = -7.1506444135661775;
bool r669934 = r669932 <= r669933;
double r669935 = 6.441277885744034;
bool r669936 = r669932 <= r669935;
double r669937 = !r669936;
bool r669938 = r669934 || r669937;
double r669939 = y;
double r669940 = -r669939;
double r669941 = exp(r669940);
double r669942 = r669941 / r669932;
double r669943 = 2.0;
double r669944 = r669943 * r669932;
double r669945 = cbrt(r669932);
double r669946 = r669932 + r669939;
double r669947 = cbrt(r669946);
double r669948 = r669945 / r669947;
double r669949 = log(r669948);
double r669950 = r669944 * r669949;
double r669951 = exp(r669950);
double r669952 = cbrt(r669945);
double r669953 = r669952 * r669952;
double r669954 = r669953 * r669952;
double r669955 = r669945 * r669954;
double r669956 = r669951 / r669955;
double r669957 = pow(r669948, r669932);
double r669958 = r669957 / r669945;
double r669959 = r669956 * r669958;
double r669960 = r669938 ? r669942 : r669959;
return r669960;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.2 |
| Herbie | 0.9 |
if x < -7.1506444135661775 or 6.441277885744034 < x Initial program 10.9
Simplified10.9
Taylor expanded around inf 0.0
if -7.1506444135661775 < x < 6.441277885744034Initial program 11.7
Simplified11.7
rmApplied add-cube-cbrt12.8
Applied add-cube-cbrt12.8
Applied add-cube-cbrt12.8
Applied times-frac12.8
Applied unpow-prod-down4.0
Applied times-frac4.0
rmApplied add-exp-log33.8
Applied add-exp-log33.8
Applied prod-exp33.8
Applied add-exp-log33.8
Applied add-exp-log33.8
Applied prod-exp33.8
Applied div-exp33.8
Applied pow-exp32.4
Simplified1.5
rmApplied add-cube-cbrt1.9
Final simplification0.9
herbie shell --seed 2020042
(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))