\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -6825213862164115456 \lor \neg \left(x \le 19.70965259845290873386147723067551851273\right):\\
\;\;\;\;e^{-y} \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\end{array}double f(double x, double y) {
double r454061 = x;
double r454062 = y;
double r454063 = r454061 + r454062;
double r454064 = r454061 / r454063;
double r454065 = log(r454064);
double r454066 = r454061 * r454065;
double r454067 = exp(r454066);
double r454068 = r454067 / r454061;
return r454068;
}
double f(double x, double y) {
double r454069 = x;
double r454070 = -6.825213862164115e+18;
bool r454071 = r454069 <= r454070;
double r454072 = 19.70965259845291;
bool r454073 = r454069 <= r454072;
double r454074 = !r454073;
bool r454075 = r454071 || r454074;
double r454076 = y;
double r454077 = -r454076;
double r454078 = exp(r454077);
double r454079 = 1.0;
double r454080 = r454079 / r454069;
double r454081 = r454078 * r454080;
double r454082 = 2.0;
double r454083 = cbrt(r454069);
double r454084 = r454069 + r454076;
double r454085 = cbrt(r454084);
double r454086 = r454083 / r454085;
double r454087 = log(r454086);
double r454088 = r454082 * r454087;
double r454089 = r454088 + r454087;
double r454090 = r454069 * r454089;
double r454091 = exp(r454090);
double r454092 = r454091 / r454069;
double r454093 = r454075 ? r454081 : r454092;
return r454093;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.5 |
| Herbie | 0.0 |
if x < -6.825213862164115e+18 or 19.70965259845291 < x Initial program 11.0
Taylor expanded around inf 0.0
Simplified0.0
rmApplied div-inv0.0
if -6.825213862164115e+18 < x < 19.70965259845291Initial program 11.2
rmApplied add-cube-cbrt11.8
Applied add-cube-cbrt11.2
Applied times-frac11.2
Applied log-prod2.3
Simplified0.0
Final simplification0.0
herbie shell --seed 2019350
(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))