\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2375445713.20731258392333984375 \lor \neg \left(x \le 3.548587978717038016185369997401721775532\right):\\
\;\;\;\;\frac{1}{e^{y} \cdot 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 r291071 = x;
double r291072 = y;
double r291073 = r291071 + r291072;
double r291074 = r291071 / r291073;
double r291075 = log(r291074);
double r291076 = r291071 * r291075;
double r291077 = exp(r291076);
double r291078 = r291077 / r291071;
return r291078;
}
double f(double x, double y) {
double r291079 = x;
double r291080 = -2375445713.2073126;
bool r291081 = r291079 <= r291080;
double r291082 = 3.548587978717038;
bool r291083 = r291079 <= r291082;
double r291084 = !r291083;
bool r291085 = r291081 || r291084;
double r291086 = 1.0;
double r291087 = y;
double r291088 = exp(r291087);
double r291089 = r291088 * r291079;
double r291090 = r291086 / r291089;
double r291091 = 2.0;
double r291092 = cbrt(r291079);
double r291093 = r291079 + r291087;
double r291094 = cbrt(r291093);
double r291095 = r291092 / r291094;
double r291096 = log(r291095);
double r291097 = r291091 * r291096;
double r291098 = r291079 * r291097;
double r291099 = exp(r291098);
double r291100 = pow(r291095, r291079);
double r291101 = r291099 * r291100;
double r291102 = r291101 / r291079;
double r291103 = r291085 ? r291090 : r291102;
return r291103;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.0 |
| Herbie | 0.0 |
if x < -2375445713.2073126 or 3.548587978717038 < x Initial program 10.6
Simplified10.6
Taylor expanded around inf 0.0
rmApplied neg-sub00.0
Applied exp-diff0.0
Applied associate-/l/0.0
Simplified0.0
if -2375445713.2073126 < x < 3.548587978717038Initial program 11.5
Simplified11.5
rmApplied add-cube-cbrt11.6
Applied add-cube-cbrt11.5
Applied times-frac11.5
Applied unpow-prod-down2.6
rmApplied add-exp-log33.7
Applied add-exp-log33.7
Applied prod-exp33.7
Applied add-exp-log33.7
Applied add-exp-log33.7
Applied prod-exp33.7
Applied div-exp33.7
Applied pow-exp32.6
Simplified0.0
Final simplification0.0
herbie shell --seed 2019304
(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))