\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 1564109357.3757057:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{x + y}}\right)\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r431411 = x;
double r431412 = y;
double r431413 = r431411 + r431412;
double r431414 = r431411 / r431413;
double r431415 = log(r431414);
double r431416 = r431411 * r431415;
double r431417 = exp(r431416);
double r431418 = r431417 / r431411;
return r431418;
}
double f(double x, double y) {
double r431419 = y;
double r431420 = 1564109357.3757057;
bool r431421 = r431419 <= r431420;
double r431422 = 2.0;
double r431423 = x;
double r431424 = cbrt(r431423);
double r431425 = r431423 + r431419;
double r431426 = cbrt(r431425);
double r431427 = r431424 / r431426;
double r431428 = log(r431427);
double r431429 = r431422 * r431428;
double r431430 = r431429 * r431423;
double r431431 = r431423 * r431428;
double r431432 = r431430 + r431431;
double r431433 = exp(r431432);
double r431434 = r431433 / r431423;
double r431435 = cbrt(r431424);
double r431436 = r431435 * r431435;
double r431437 = r431436 * r431435;
double r431438 = r431437 / r431426;
double r431439 = log(r431438);
double r431440 = r431422 * r431439;
double r431441 = r431440 * r431423;
double r431442 = r431441 + r431431;
double r431443 = exp(r431442);
double r431444 = r431443 / r431423;
double r431445 = r431421 ? r431434 : r431444;
return r431445;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.0 |
| Herbie | 3.9 |
if y < 1564109357.3757057Initial program 4.6
rmApplied add-cube-cbrt28.7
Applied add-cube-cbrt4.6
Applied times-frac4.6
Applied log-prod1.8
Applied distribute-lft-in1.8
Simplified1.2
if 1564109357.3757057 < y Initial program 33.1
rmApplied add-cube-cbrt25.5
Applied add-cube-cbrt33.2
Applied times-frac33.2
Applied log-prod22.8
Applied distribute-lft-in22.8
Simplified20.6
rmApplied add-cube-cbrt12.8
Final simplification3.9
herbie shell --seed 2020043
(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))