\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.901247255096526472927968321689508282152 \cdot 10^{93} \lor \neg \left(x \le 3.427314966810909420478563204128016522016 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right|\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r310237 = x;
double r310238 = y;
double r310239 = r310237 + r310238;
double r310240 = r310237 / r310239;
double r310241 = log(r310240);
double r310242 = r310237 * r310241;
double r310243 = exp(r310242);
double r310244 = r310243 / r310237;
return r310244;
}
double f(double x, double y) {
double r310245 = x;
double r310246 = -1.9012472550965265e+93;
bool r310247 = r310245 <= r310246;
double r310248 = 3.4273149668109094e-18;
bool r310249 = r310245 <= r310248;
double r310250 = !r310249;
bool r310251 = r310247 || r310250;
double r310252 = y;
double r310253 = -r310252;
double r310254 = exp(r310253);
double r310255 = r310254 / r310245;
double r310256 = cbrt(r310245);
double r310257 = r310252 + r310245;
double r310258 = cbrt(r310257);
double r310259 = r310256 / r310258;
double r310260 = fabs(r310259);
double r310261 = pow(r310260, r310245);
double r310262 = r310261 * r310261;
double r310263 = pow(r310259, r310245);
double r310264 = r310245 / r310263;
double r310265 = r310262 / r310264;
double r310266 = r310251 ? r310255 : r310265;
return r310266;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.3 |
| Herbie | 0.7 |
if x < -1.9012472550965265e+93 or 3.4273149668109094e-18 < x Initial program 11.2
Simplified11.2
Taylor expanded around inf 0.8
if -1.9012472550965265e+93 < x < 3.4273149668109094e-18Initial program 11.0
Simplified11.0
rmApplied add-cube-cbrt16.4
Applied add-cube-cbrt11.0
Applied times-frac11.0
Applied unpow-prod-down2.8
Applied associate-/l*2.8
Simplified2.8
rmApplied add-sqr-sqrt2.8
Applied unpow-prod-down2.8
Simplified2.8
Simplified0.7
Final simplification0.7
herbie shell --seed 2019196 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))