\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 562.72914128011621 \lor \neg \left(y \le 1.31329328247722981 \cdot 10^{62}\right) \land y \le 5.26434816177796769 \cdot 10^{115}:\\
\;\;\;\;\frac{{1}^{\left(\sqrt[3]{x}\right)}}{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 <= 562.7291412801162) || (!(y <= 1.3132932824772298e+62) && (y <= 5.264348161777968e+115)))) {
VAR = ((double) (((double) pow(1.0, ((double) cbrt(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.6 |
|---|---|
| Target | 8.0 |
| Herbie | 8.0 |
if y < 562.72914128011621 or 1.31329328247722981e62 < y < 5.26434816177796769e115Initial program 6.3
Simplified6.3
rmApplied add-cube-cbrt6.3
Applied pow-unpow6.3
Taylor expanded around inf 36.3
Simplified3.3
if 562.72914128011621 < y < 1.31329328247722981e62 or 5.26434816177796769e115 < y Initial program 33.0
Simplified33.0
rmApplied add-log-exp27.2
Final simplification8.0
herbie shell --seed 2020179
(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))