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




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.0 |
| Herbie | 0.0 |
if x < -5349815.209025494 or 7.732105221395109 < x Initial program 11.1
Simplified11.1
rmApplied clear-num11.1
Taylor expanded around inf 0.0
Simplified0.0
if -5349815.209025494 < x < 7.732105221395109Initial program 11.0
Simplified11.0
rmApplied add-cube-cbrt11.1
Applied add-cube-cbrt11.0
Applied times-frac11.0
Applied unpow-prod-down2.6
rmApplied add-exp-log33.2
Applied add-exp-log33.2
Applied prod-exp33.2
Applied add-exp-log33.2
Applied add-exp-log33.2
Applied prod-exp33.2
Applied div-exp33.2
Applied pow-exp31.6
Simplified0.0
Final simplification0.0
herbie shell --seed 2020147
(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))