\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 51088118733.370209:\\
\;\;\;\;\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 \left(2 \cdot \log \left(\frac{{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\end{array}double f(double x, double y) {
double r375432 = x;
double r375433 = y;
double r375434 = r375432 + r375433;
double r375435 = r375432 / r375434;
double r375436 = log(r375435);
double r375437 = r375432 * r375436;
double r375438 = exp(r375437);
double r375439 = r375438 / r375432;
return r375439;
}
double f(double x, double y) {
double r375440 = y;
double r375441 = 51088118733.37021;
bool r375442 = r375440 <= r375441;
double r375443 = x;
double r375444 = 2.0;
double r375445 = cbrt(r375443);
double r375446 = r375443 + r375440;
double r375447 = cbrt(r375446);
double r375448 = r375445 / r375447;
double r375449 = log(r375448);
double r375450 = r375444 * r375449;
double r375451 = r375450 + r375449;
double r375452 = r375443 * r375451;
double r375453 = exp(r375452);
double r375454 = r375453 / r375443;
double r375455 = r375445 * r375445;
double r375456 = 0.3333333333333333;
double r375457 = pow(r375455, r375456);
double r375458 = cbrt(r375445);
double r375459 = r375457 * r375458;
double r375460 = r375459 / r375447;
double r375461 = log(r375460);
double r375462 = r375444 * r375461;
double r375463 = r375462 + r375449;
double r375464 = r375443 * r375463;
double r375465 = exp(r375464);
double r375466 = r375465 / r375443;
double r375467 = r375442 ? r375454 : r375466;
return r375467;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 8.2 |
| Herbie | 3.6 |
if y < 51088118733.37021Initial program 4.7
rmApplied add-cube-cbrt28.8
Applied add-cube-cbrt4.7
Applied times-frac4.7
Applied log-prod2.0
Simplified1.4
if 51088118733.37021 < y Initial program 31.6
rmApplied add-cube-cbrt24.0
Applied add-cube-cbrt31.7
Applied times-frac31.7
Applied log-prod22.9
Simplified20.2
rmApplied add-cube-cbrt17.1
Applied cbrt-prod13.3
rmApplied pow1/310.8
Final simplification3.6
herbie shell --seed 2020047 +o rules:numerics
(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))