\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -4.120156288663160099262452246870941235987 \cdot 10^{50} \lor \neg \left(x \le \frac{2698076950201437}{2417851639229258349412352}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{\frac{x}{\frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{1}}}\\
\end{array}double f(double x, double y) {
double r343427 = x;
double r343428 = y;
double r343429 = r343427 + r343428;
double r343430 = r343427 / r343429;
double r343431 = log(r343430);
double r343432 = r343427 * r343431;
double r343433 = exp(r343432);
double r343434 = r343433 / r343427;
return r343434;
}
double f(double x, double y) {
double r343435 = x;
double r343436 = -4.12015628866316e+50;
bool r343437 = r343435 <= r343436;
double r343438 = 2698076950201437.0;
double r343439 = 2.4178516392292583e+24;
double r343440 = r343438 / r343439;
bool r343441 = r343435 <= r343440;
double r343442 = !r343441;
bool r343443 = r343437 || r343442;
double r343444 = -1.0;
double r343445 = y;
double r343446 = r343444 * r343445;
double r343447 = exp(r343446);
double r343448 = r343447 / r343435;
double r343449 = cbrt(r343435);
double r343450 = r343435 + r343445;
double r343451 = cbrt(r343450);
double r343452 = r343449 / r343451;
double r343453 = log(r343452);
double r343454 = r343453 + r343453;
double r343455 = r343435 * r343454;
double r343456 = exp(r343455);
double r343457 = pow(r343452, r343435);
double r343458 = 1.0;
double r343459 = r343457 / r343458;
double r343460 = r343435 / r343459;
double r343461 = r343456 / r343460;
double r343462 = r343443 ? r343448 : r343461;
return r343462;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.0 |
| Herbie | 0.3 |
if x < -4.12015628866316e+50 or 1.1158984721914147e-09 < x Initial program 11.7
Taylor expanded around inf 0.5
if -4.12015628866316e+50 < x < 1.1158984721914147e-09Initial program 10.6
rmApplied add-cube-cbrt13.5
Applied add-cube-cbrt10.6
Applied times-frac10.6
Applied log-prod2.0
Applied distribute-lft-in2.0
Applied exp-sum2.0
Applied associate-/l*2.0
Simplified2.0
rmApplied times-frac2.0
Applied log-prod0.2
Final simplification0.3
herbie shell --seed 2019303
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.73118442066479561e94) (/ (exp (/ -1 y)) x) (if (< y 2.81795924272828789e37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))