\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -0.022243402371581053 \lor \neg \left(x \le 6.68908904697125184\right):\\
\;\;\;\;\frac{1}{\frac{x}{e^{-1 \cdot y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(x \cdot 2\right) \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)} \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 <= -0.022243402371581053) || !(x <= 6.689089046971252))) {
VAR = ((double) (1.0 / ((double) (x / ((double) exp(((double) (-1.0 * y))))))));
} else {
VAR = ((double) (((double) (((double) exp(((double) (((double) (x * 2.0)) * ((double) log(((double) (((double) cbrt(x)) / ((double) cbrt(((double) (x + y)))))))))))) * ((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.4 |
|---|---|
| Target | 8.4 |
| Herbie | 0.1 |
if x < -0.022243402371581053 or 6.689089046971252 < x Initial program 11.4
Simplified11.4
rmApplied clear-num11.4
Taylor expanded around inf 0.1
Simplified0.1
if -0.022243402371581053 < x < 6.689089046971252Initial program 11.4
Simplified11.4
rmApplied add-cube-cbrt11.4
Applied add-cube-cbrt11.4
Applied times-frac11.4
Applied unpow-prod-down2.2
rmApplied add-exp-log33.0
Applied add-exp-log33.1
Applied prod-exp33.1
Applied add-exp-log33.1
Applied add-exp-log33.1
Applied prod-exp33.1
Applied div-exp33.1
Applied pow-exp32.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2020140
(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))