\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.586278741066603026719117062716528151836 \cdot 10^{77} \lor \neg \left(x \le 0.855393223560350968170951091451570391655\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r229214 = x;
double r229215 = y;
double r229216 = r229214 + r229215;
double r229217 = r229214 / r229216;
double r229218 = log(r229217);
double r229219 = r229214 * r229218;
double r229220 = exp(r229219);
double r229221 = r229220 / r229214;
return r229221;
}
double f(double x, double y) {
double r229222 = x;
double r229223 = -2.586278741066603e+77;
bool r229224 = r229222 <= r229223;
double r229225 = 0.855393223560351;
bool r229226 = r229222 <= r229225;
double r229227 = !r229226;
bool r229228 = r229224 || r229227;
double r229229 = -1.0;
double r229230 = y;
double r229231 = r229229 * r229230;
double r229232 = exp(r229231);
double r229233 = r229232 / r229222;
double r229234 = cbrt(r229222);
double r229235 = r229222 + r229230;
double r229236 = cbrt(r229235);
double r229237 = r229234 / r229236;
double r229238 = pow(r229237, r229222);
double r229239 = r229238 * r229238;
double r229240 = r229238 / r229222;
double r229241 = r229239 * r229240;
double r229242 = r229228 ? r229233 : r229241;
return r229242;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
if x < -2.586278741066603e+77 or 0.855393223560351 < x Initial program 11.5
Simplified11.5
Taylor expanded around inf 0.1
Simplified0.1
if -2.586278741066603e+77 < x < 0.855393223560351Initial program 10.3
Simplified10.3
rmApplied *-un-lft-identity10.3
Applied add-cube-cbrt14.6
Applied add-cube-cbrt10.3
Applied times-frac10.3
Applied unpow-prod-down2.3
Applied times-frac2.3
Simplified2.3
rmApplied times-frac2.3
Applied unpow-prod-down0.3
Final simplification0.2
herbie shell --seed 2019294
(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))