\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.22570901681932209:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{elif}\;x \le 10.492748568877783:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{1}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{x + y}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\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 <= -7.225709016819322)) {
VAR = ((double) (((double) exp(((double) (-1.0 * y)))) / x));
} else {
double VAR_1;
if ((x <= 10.492748568877783)) {
VAR_1 = ((double) (((double) (((double) pow(((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / 1.0)), x)) * ((double) pow(((double) (((double) cbrt(x)) / ((double) (x + y)))), x)))) / x));
} else {
VAR_1 = ((double) (1.0 / ((double) (x * ((double) exp(y))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.8 |
| Herbie | 1.3 |
if x < -7.225709016819322Initial program 13.1
Simplified13.1
Taylor expanded around inf 0.1
Simplified0.1
if -7.225709016819322 < x < 10.492748568877783Initial program 11.2
Simplified11.2
rmApplied *-un-lft-identity11.2
Applied add-cube-cbrt11.2
Applied times-frac11.2
Applied unpow-prod-down2.8
if 10.492748568877783 < x Initial program 9.2
Simplified9.2
Taylor expanded around inf 0.0
Simplified0.0
rmApplied clear-num0.0
Simplified0.0
Final simplification1.3
herbie shell --seed 2020130
(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.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))