\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.361918972808934889291186360667730003785 \cdot 10^{107} \lor \neg \left(x \le 2.625152943905098901211658812826499342918\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r284859 = x;
double r284860 = y;
double r284861 = r284859 + r284860;
double r284862 = r284859 / r284861;
double r284863 = log(r284862);
double r284864 = r284859 * r284863;
double r284865 = exp(r284864);
double r284866 = r284865 / r284859;
return r284866;
}
double f(double x, double y) {
double r284867 = x;
double r284868 = -1.3619189728089349e+107;
bool r284869 = r284867 <= r284868;
double r284870 = 2.625152943905099;
bool r284871 = r284867 <= r284870;
double r284872 = !r284871;
bool r284873 = r284869 || r284872;
double r284874 = y;
double r284875 = -r284874;
double r284876 = exp(r284875);
double r284877 = r284876 / r284867;
double r284878 = 2.0;
double r284879 = cbrt(r284867);
double r284880 = r284867 + r284874;
double r284881 = cbrt(r284880);
double r284882 = r284879 / r284881;
double r284883 = log(r284882);
double r284884 = r284878 * r284883;
double r284885 = r284867 * r284884;
double r284886 = exp(r284885);
double r284887 = pow(r284882, r284867);
double r284888 = r284886 * r284887;
double r284889 = r284888 / r284867;
double r284890 = r284873 ? r284877 : r284889;
return r284890;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.6 |
|---|---|
| Target | 7.5 |
| Herbie | 0.4 |
if x < -1.3619189728089349e+107 or 2.625152943905099 < x Initial program 10.8
Simplified10.8
Taylor expanded around inf 0.0
if -1.3619189728089349e+107 < x < 2.625152943905099Initial program 10.5
Simplified10.5
rmApplied add-cube-cbrt16.0
Applied add-cube-cbrt10.5
Applied times-frac10.5
Applied unpow-prod-down2.8
rmApplied add-exp-log37.1
Applied add-exp-log37.1
Applied prod-exp37.1
Applied add-exp-log37.1
Applied add-exp-log37.1
Applied prod-exp37.1
Applied div-exp37.1
Applied pow-exp36.1
Simplified0.8
Final simplification0.4
herbie shell --seed 2019212
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.73118442066479561e94) (/ (exp (/ -1 y)) x) (if (< y 2.81795924272828789e37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))