\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.575795415940148063364153542342468795089 \cdot 10^{92} \lor \neg \left(x \le 2.134762495789531033807406856794841587543\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)}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r314249 = x;
double r314250 = y;
double r314251 = r314249 + r314250;
double r314252 = r314249 / r314251;
double r314253 = log(r314252);
double r314254 = r314249 * r314253;
double r314255 = exp(r314254);
double r314256 = r314255 / r314249;
return r314256;
}
double f(double x, double y) {
double r314257 = x;
double r314258 = -2.575795415940148e+92;
bool r314259 = r314257 <= r314258;
double r314260 = 2.134762495789531;
bool r314261 = r314257 <= r314260;
double r314262 = !r314261;
bool r314263 = r314259 || r314262;
double r314264 = y;
double r314265 = -r314264;
double r314266 = exp(r314265);
double r314267 = r314266 / r314257;
double r314268 = 2.0;
double r314269 = cbrt(r314257);
double r314270 = r314257 + r314264;
double r314271 = cbrt(r314270);
double r314272 = r314269 / r314271;
double r314273 = log(r314272);
double r314274 = r314268 * r314273;
double r314275 = r314257 * r314274;
double r314276 = exp(r314275);
double r314277 = pow(r314272, r314257);
double r314278 = r314257 / r314277;
double r314279 = r314276 / r314278;
double r314280 = r314263 ? r314267 : r314279;
return r314280;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
if x < -2.575795415940148e+92 or 2.134762495789531 < x Initial program 11.1
Simplified11.1
Taylor expanded around inf 0.0
if -2.575795415940148e+92 < x < 2.134762495789531Initial program 10.8
Simplified10.8
rmApplied add-cube-cbrt15.9
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.4
Applied associate-/l*2.4
rmApplied add-exp-log37.6
Applied add-exp-log37.6
Applied prod-exp37.6
Applied add-exp-log37.6
Applied add-exp-log37.6
Applied prod-exp37.6
Applied div-exp37.6
Applied pow-exp36.6
Simplified0.3
Final simplification0.2
herbie shell --seed 2019208
(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))