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




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.6 |
| Herbie | 0.4 |
if x < -1.1520662094029635e-15 or 1.5559169625596469e-06 < x Initial program 10.6
Simplified10.6
Taylor expanded around inf 0.7
Simplified0.7
if -1.1520662094029635e-15 < x < 1.5559169625596469e-06Initial program 11.7
Simplified11.7
rmApplied add-cube-cbrt11.7
Applied *-un-lft-identity11.7
Applied times-frac11.7
Applied unpow-prod-down3.1
rmApplied add-cube-cbrt3.1
Applied cbrt-prod3.1
Applied add-cube-cbrt3.1
Applied times-frac3.1
Applied unpow-prod-down0.0
Final simplification0.4
herbie shell --seed 2020120
(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 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 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))