\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -10594210996052847989843034112 \lor \neg \left(x \le 0.003027614112253133524244042007467214716598\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r260486 = x;
double r260487 = y;
double r260488 = r260486 + r260487;
double r260489 = r260486 / r260488;
double r260490 = log(r260489);
double r260491 = r260486 * r260490;
double r260492 = exp(r260491);
double r260493 = r260492 / r260486;
return r260493;
}
double f(double x, double y) {
double r260494 = x;
double r260495 = -1.0594210996052848e+28;
bool r260496 = r260494 <= r260495;
double r260497 = 0.0030276141122531335;
bool r260498 = r260494 <= r260497;
double r260499 = !r260498;
bool r260500 = r260496 || r260499;
double r260501 = y;
double r260502 = -r260501;
double r260503 = exp(r260502);
double r260504 = r260503 / r260494;
double r260505 = 2.0;
double r260506 = cbrt(r260494);
double r260507 = r260494 + r260501;
double r260508 = cbrt(r260507);
double r260509 = r260506 / r260508;
double r260510 = log(r260509);
double r260511 = r260505 * r260510;
double r260512 = r260494 * r260511;
double r260513 = r260494 * r260510;
double r260514 = r260512 + r260513;
double r260515 = exp(r260514);
double r260516 = r260515 / r260494;
double r260517 = r260500 ? r260504 : r260516;
return r260517;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
if x < -1.0594210996052848e+28 or 0.0030276141122531335 < x Initial program 11.9
Taylor expanded around inf 0.2
Simplified0.2
if -1.0594210996052848e+28 < x < 0.0030276141122531335Initial program 10.7
rmApplied add-cube-cbrt11.9
Applied add-cube-cbrt10.7
Applied times-frac10.7
Applied log-prod2.3
Applied distribute-lft-in2.3
Simplified0.1
Final simplification0.2
herbie shell --seed 2019306
(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))