\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 19404822192.444565 \lor \neg \left(y \le 2.7290368280004027 \cdot 10^{161}\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{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{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 (((y <= 19404822192.444565) || !(y <= 2.7290368280004027e+161))) {
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) pow(((double) (((double) (1.0 / ((double) (((double) cbrt(((double) (x + y)))) * ((double) cbrt(((double) (x + y)))))))) * ((double) (x / ((double) cbrt(((double) (x + y)))))))), x)) / x));
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.1 |
| Herbie | 4.7 |
if y < 19404822192.444565 or 2.7290368280004027e161 < y Initial program 7.8
Simplified7.8
rmApplied add-cube-cbrt28.5
Applied add-cube-cbrt7.8
Applied times-frac7.8
Applied unpow-prod-down3.7
rmApplied add-exp-log47.2
Applied add-exp-log47.3
Applied prod-exp47.4
Applied add-exp-log47.3
Applied add-exp-log41.6
Applied prod-exp35.3
Applied div-exp35.3
Applied pow-exp34.7
Simplified2.3
if 19404822192.444565 < y < 2.7290368280004027e161Initial program 33.4
Simplified33.4
rmApplied add-cube-cbrt21.0
Applied *-un-lft-identity21.0
Applied times-frac21.5
Final simplification4.7
herbie shell --seed 2020152
(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))