\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 14.3367817113127866690547307371161878109:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{x + y}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r28737468 = x;
double r28737469 = y;
double r28737470 = r28737468 + r28737469;
double r28737471 = r28737468 / r28737470;
double r28737472 = log(r28737471);
double r28737473 = r28737468 * r28737472;
double r28737474 = exp(r28737473);
double r28737475 = r28737474 / r28737468;
return r28737475;
}
double f(double x, double y) {
double r28737476 = y;
double r28737477 = 14.336781711312787;
bool r28737478 = r28737476 <= r28737477;
double r28737479 = 1.0;
double r28737480 = x;
double r28737481 = r28737479 / r28737480;
double r28737482 = cbrt(r28737480);
double r28737483 = r28737482 * r28737482;
double r28737484 = r28737480 + r28737476;
double r28737485 = r28737482 / r28737484;
double r28737486 = r28737483 * r28737485;
double r28737487 = log(r28737486);
double r28737488 = r28737487 * r28737480;
double r28737489 = exp(r28737488);
double r28737490 = r28737489 / r28737480;
double r28737491 = r28737478 ? r28737481 : r28737490;
return r28737491;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.8 |
| Herbie | 6.9 |
if y < 14.336781711312787Initial program 4.6
Taylor expanded around inf 1.3
if 14.336781711312787 < y Initial program 32.9
rmApplied *-un-lft-identity32.9
Applied add-cube-cbrt24.5
Applied times-frac25.0
Simplified25.0
Final simplification6.9
herbie shell --seed 2019171
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))