\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.98796217281238501 \cdot 10^{42}:\\
\;\;\;\;\frac{1}{e^{y} \cdot x}\\
\mathbf{elif}\;x \le 6065.9896509303089:\\
\;\;\;\;\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r381282 = x;
double r381283 = y;
double r381284 = r381282 + r381283;
double r381285 = r381282 / r381284;
double r381286 = log(r381285);
double r381287 = r381282 * r381286;
double r381288 = exp(r381287);
double r381289 = r381288 / r381282;
return r381289;
}
double f(double x, double y) {
double r381290 = x;
double r381291 = -3.987962172812385e+42;
bool r381292 = r381290 <= r381291;
double r381293 = 1.0;
double r381294 = y;
double r381295 = exp(r381294);
double r381296 = r381295 * r381290;
double r381297 = r381293 / r381296;
double r381298 = 6065.989650930309;
bool r381299 = r381290 <= r381298;
double r381300 = cbrt(r381290);
double r381301 = r381290 + r381294;
double r381302 = cbrt(r381301);
double r381303 = r381300 / r381302;
double r381304 = fabs(r381303);
double r381305 = pow(r381304, r381290);
double r381306 = r381305 * r381305;
double r381307 = pow(r381303, r381290);
double r381308 = r381307 / r381290;
double r381309 = r381306 * r381308;
double r381310 = -r381294;
double r381311 = exp(r381310);
double r381312 = r381311 / r381290;
double r381313 = r381299 ? r381309 : r381312;
double r381314 = r381292 ? r381297 : r381313;
return r381314;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 8.0 |
| Herbie | 0.1 |
if x < -3.987962172812385e+42Initial program 14.1
Simplified14.1
Taylor expanded around inf 0.0
rmApplied clear-num0.1
Simplified0.1
if -3.987962172812385e+42 < x < 6065.989650930309Initial program 10.6
Simplified10.6
rmApplied *-un-lft-identity10.6
Applied add-cube-cbrt12.9
Applied add-cube-cbrt10.6
Applied times-frac10.6
Applied unpow-prod-down2.5
Applied times-frac2.5
Simplified2.5
rmApplied add-sqr-sqrt2.5
Applied unpow-prod-down2.5
Simplified2.5
Simplified0.1
if 6065.989650930309 < x Initial program 10.3
Simplified10.3
Taylor expanded around inf 0.0
Final simplification0.1
herbie shell --seed 2020045 +o rules:numerics
(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))