\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 r398066 = x;
double r398067 = y;
double r398068 = r398066 + r398067;
double r398069 = r398066 / r398068;
double r398070 = log(r398069);
double r398071 = r398066 * r398070;
double r398072 = exp(r398071);
double r398073 = r398072 / r398066;
return r398073;
}
double f(double x, double y) {
double r398074 = x;
double r398075 = -3.987962172812385e+42;
bool r398076 = r398074 <= r398075;
double r398077 = 1.0;
double r398078 = y;
double r398079 = exp(r398078);
double r398080 = r398079 * r398074;
double r398081 = r398077 / r398080;
double r398082 = 6065.989650930309;
bool r398083 = r398074 <= r398082;
double r398084 = cbrt(r398074);
double r398085 = r398074 + r398078;
double r398086 = cbrt(r398085);
double r398087 = r398084 / r398086;
double r398088 = fabs(r398087);
double r398089 = pow(r398088, r398074);
double r398090 = r398089 * r398089;
double r398091 = pow(r398087, r398074);
double r398092 = r398091 / r398074;
double r398093 = r398090 * r398092;
double r398094 = -r398078;
double r398095 = exp(r398094);
double r398096 = r398095 / r398074;
double r398097 = r398083 ? r398093 : r398096;
double r398098 = r398076 ? r398081 : r398097;
return r398098;
}




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 neg-sub00.0
Applied exp-diff0.0
Applied associate-/l/0.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
(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))