\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -0.30757307122549704 \lor \neg \left(x \le 2.85149303164030605 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{x}{\sqrt[3]{x + y}}\right)}^{x}}{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 <= -0.30757307122549704) || !(x <= 2.851493031640306e-15))) {
VAR = ((double) (1.0 / ((double) (x * ((double) exp(y))))));
} else {
VAR = ((double) (((double) (((double) pow(((double) (1.0 / ((double) (((double) cbrt(((double) (x + y)))) * ((double) cbrt(((double) (x + y)))))))), x)) * ((double) pow(((double) (x / ((double) cbrt(((double) (x + y)))))), x)))) / x));
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.0 |
| Herbie | 2.0 |
if x < -0.30757307122549704 or 2.851493031640306e-15 < x Initial program 10.2
Simplified10.2
Taylor expanded around inf 0.8
Simplified0.8
rmApplied clear-num0.8
Simplified0.8
if -0.30757307122549704 < x < 2.851493031640306e-15Initial program 11.9
Simplified11.9
rmApplied add-cube-cbrt11.9
Applied *-un-lft-identity11.9
Applied times-frac11.9
Applied unpow-prod-down3.4
Final simplification2.0
herbie shell --seed 2020148
(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))