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




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.0 |
| Herbie | 4.9 |
if y < 301.082159981589882 or 3.889536814595454e111 < y Initial program 8.9
Simplified8.9
rmApplied add-cube-cbrt28.6
Applied add-cube-cbrt8.9
Applied times-frac8.9
Applied unpow-prod-down4.5
Simplified4.5
rmApplied pow14.5
Applied pow14.5
Applied pow-prod-up4.5
Applied pow-pow3.1
Simplified3.1
if 301.082159981589882 < y < 3.889536814595454e111Initial program 35.3
Simplified35.3
rmApplied add-log-exp23.0
Final simplification4.9
herbie shell --seed 2020184
(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))