\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \leq 78554065061.35825 \lor \neg \left(y \leq 5.595107226688032 \cdot 10^{+204}\right):\\
\;\;\;\;\frac{{\left({\left(\frac{x}{y + x}\right)}^{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}\right)}^{\left(\log \left(e^{\sqrt[3]{x}}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}\right)}^{3}}\\
\end{array}(FPCore (x y) :precision binary64 (/ (exp (* x (log (/ x (+ x y))))) x))
(FPCore (x y) :precision binary64 (if (or (<= y 78554065061.35825) (not (<= y 5.595107226688032e+204))) (/ (pow (pow (/ x (+ y x)) (* (cbrt x) (cbrt x))) (log (exp (cbrt x)))) x) (cbrt (pow (/ (pow (/ x (+ y x)) x) x) 3.0))))
double code(double x, double y) {
return (((double) exp(((double) (x * ((double) log((x / ((double) (x + y))))))))) / x);
}
double code(double x, double y) {
double tmp;
if (((y <= 78554065061.35825) || !(y <= 5.595107226688032e+204))) {
tmp = (((double) pow(((double) pow((x / ((double) (y + x))), ((double) (((double) cbrt(x)) * ((double) cbrt(x)))))), ((double) log(((double) exp(((double) cbrt(x)))))))) / x);
} else {
tmp = ((double) cbrt(((double) pow((((double) pow((x / ((double) (y + x))), x)) / x), 3.0))));
}
return tmp;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 7.8 |
| Herbie | 4.5 |
if y < 78554065061.358246 or 5.5951072266880319e204 < y Initial program Error: 6.7 bits
SimplifiedError: 6.7 bits
rmApplied add-cube-cbrtError: 6.7 bits
Applied pow-unpowError: 6.7 bits
rmApplied add-log-expError: 1.9 bits
if 78554065061.358246 < y < 5.5951072266880319e204Initial program Error: 34.4 bits
SimplifiedError: 34.3 bits
rmApplied add-cbrt-cubeError: 18.2 bits
Applied add-cbrt-cubeError: 18.3 bits
Applied cbrt-undivError: 18.4 bits
SimplifiedError: 18.5 bits
Final simplificationError: 4.5 bits
herbie shell --seed 2020203
(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))