\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1522673.77978565614:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 1.0347496741749575 \cdot 10^{-9}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\end{array}double code(double x, double y) {
return ((double) (((double) exp(((double) (x * ((double) log(((double) (x / ((double) (x + y)))))))))) / x));
}
double code(double x, double y) {
double VAR;
if ((x <= -1522673.7797856561)) {
VAR = ((double) (1.0 / ((double) (x * ((double) exp(y))))));
} else {
double VAR_1;
if ((x <= 1.0347496741749575e-09)) {
VAR_1 = ((double) (((double) (((double) pow(((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) (((double) cbrt(((double) (x + y)))) * ((double) cbrt(((double) (x + y)))))))), x)) * ((double) pow(((double) (((double) cbrt(x)) / ((double) cbrt(((double) (x + y)))))), x)))) / x));
} else {
VAR_1 = ((double) (((double) exp(((double) (-1.0 * y)))) / x));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.0 |
| Herbie | 1.2 |
if x < -1522673.7797856561Initial program 12.4
Simplified12.4
Taylor expanded around inf 0.0
Simplified0.0
rmApplied clear-num0.0
Simplified0.0
if -1522673.7797856561 < x < 1.0347496741749575e-09Initial program 11.6
Simplified11.6
rmApplied add-cube-cbrt11.7
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down2.2
if 1.0347496741749575e-09 < x Initial program 10.4
Simplified10.4
Taylor expanded around inf 0.6
Simplified0.6
Final simplification1.2
herbie shell --seed 2020123 +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))