\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.00609546226127861 \cdot 10^{37} \lor \neg \left(x \le 21.947453469777777\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double code(double x, double y) {
return (exp((x * log((x / (x + y))))) / x);
}
double code(double x, double y) {
double temp;
if (((x <= -3.0060954622612786e+37) || !(x <= 21.947453469777777))) {
temp = (1.0 / (x * exp(y)));
} else {
temp = (((pow((cbrt(x) / cbrt((x + y))), x) * pow((cbrt(x) / cbrt((x + y))), x)) * pow((cbrt(x) / cbrt((x + y))), x)) / x);
}
return temp;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.4 |
| Herbie | 0.1 |
if x < -3.0060954622612786e+37 or 21.947453469777777 < x Initial program 10.5
Simplified10.5
Taylor expanded around inf 0.0
Simplified0.0
rmApplied clear-num0.0
Simplified0.0
if -3.0060954622612786e+37 < x < 21.947453469777777Initial program 11.3
Simplified11.3
rmApplied add-cube-cbrt12.9
Applied add-cube-cbrt11.3
Applied times-frac11.3
Applied unpow-prod-down2.6
rmApplied times-frac2.6
Applied unpow-prod-down0.1
Final simplification0.1
herbie shell --seed 2020053
(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))