\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 1.20102239621656768 \cdot 10^{23} \lor \neg \left(y \le 1.9614730774488089 \cdot 10^{177}\right):\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{x + y}\right)}}{x}\\
\end{array}double code(double x, double y) {
return (exp((x * log((x / (x + y))))) / x);
}
double code(double x, double y) {
double VAR;
if (((y <= 1.2010223962165677e+23) || !(y <= 1.961473077448809e+177))) {
VAR = (exp((x * ((2.0 * log((cbrt(x) / cbrt((x + y))))) + log((cbrt(x) / cbrt((x + y))))))) / x);
} else {
VAR = (exp((x * log(((cbrt(x) * cbrt(x)) * (cbrt(x) / (x + y)))))) / x);
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.8 |
|---|---|
| Target | 7.9 |
| Herbie | 5.1 |
if y < 1.2010223962165677e+23 or 1.961473077448809e+177 < y Initial program 7.5
rmApplied add-cube-cbrt28.6
Applied add-cube-cbrt7.5
Applied times-frac7.5
Applied log-prod3.5
Simplified2.4
if 1.2010223962165677e+23 < y < 1.961473077448809e+177Initial program 33.9
rmApplied *-un-lft-identity33.9
Applied add-cube-cbrt23.8
Applied times-frac24.0
Simplified24.0
Final simplification5.1
herbie shell --seed 2020079
(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))