\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 149.036041139693879 \lor \neg \left(y \le 1.703524521751446 \cdot 10^{203}\right):\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot \left({\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{\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 (((y <= 149.03604113969388) || !(y <= 1.703524521751446e+203))) {
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));
} else {
VAR = ((double) (((double) (((double) pow(((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) (((double) cbrt(((double) (x + y)))) * ((double) cbrt(((double) (x + y)))))))), x)) * ((double) (((double) pow(((double) (((double) cbrt(((double) (((double) cbrt(x)) * ((double) cbrt(x)))))) / ((double) (((double) cbrt(((double) cbrt(((double) (x + y)))))) * ((double) cbrt(((double) cbrt(((double) (x + y)))))))))), x)) * ((double) pow(((double) (((double) cbrt(((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.8 |
| Herbie | 4.2 |
if y < 149.036041139693879 or 1.703524521751446e203 < y Initial program 6.6
Simplified6.6
rmApplied add-cube-cbrt29.0
Applied add-cube-cbrt6.6
Applied times-frac6.6
Applied unpow-prod-down2.7
rmApplied add-exp-log47.5
Applied add-exp-log47.5
Applied prod-exp47.6
Applied add-exp-log47.5
Applied add-exp-log41.2
Applied prod-exp34.8
Applied div-exp34.8
Applied pow-exp34.1
Simplified1.5
if 149.036041139693879 < y < 1.703524521751446e203Initial program 33.9
Simplified33.9
rmApplied add-cube-cbrt23.4
Applied add-cube-cbrt33.9
Applied times-frac33.9
Applied unpow-prod-down27.9
rmApplied add-cube-cbrt17.9
Applied add-cube-cbrt17.8
Applied cbrt-prod18.5
Applied times-frac18.1
Applied unpow-prod-down18.2
Final simplification4.2
herbie shell --seed 2020150
(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))