\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 203.2754817400328022358735324814915657043 \lor \neg \left(y \le 2.946589273213928799067845252652734687475 \cdot 10^{120}\right):\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{\frac{x}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r326287 = x;
double r326288 = y;
double r326289 = r326287 + r326288;
double r326290 = r326287 / r326289;
double r326291 = log(r326290);
double r326292 = r326287 * r326291;
double r326293 = exp(r326292);
double r326294 = r326293 / r326287;
return r326294;
}
double f(double x, double y) {
double r326295 = y;
double r326296 = 203.2754817400328;
bool r326297 = r326295 <= r326296;
double r326298 = 2.946589273213929e+120;
bool r326299 = r326295 <= r326298;
double r326300 = !r326299;
bool r326301 = r326297 || r326300;
double r326302 = x;
double r326303 = 2.0;
double r326304 = cbrt(r326302);
double r326305 = r326302 + r326295;
double r326306 = cbrt(r326305);
double r326307 = r326304 / r326306;
double r326308 = log(r326307);
double r326309 = r326303 * r326308;
double r326310 = r326302 * r326309;
double r326311 = r326302 * r326308;
double r326312 = r326310 + r326311;
double r326313 = exp(r326312);
double r326314 = r326313 / r326302;
double r326315 = r326306 * r326306;
double r326316 = r326302 / r326315;
double r326317 = r326316 / r326306;
double r326318 = log(r326317);
double r326319 = r326302 * r326318;
double r326320 = exp(r326319);
double r326321 = r326320 / r326302;
double r326322 = r326301 ? r326314 : r326321;
return r326322;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.8 |
| Herbie | 5.0 |
if y < 203.2754817400328 or 2.946589273213929e+120 < y Initial program 8.4
rmApplied add-cube-cbrt28.8
Applied add-cube-cbrt8.4
Applied times-frac8.4
Applied log-prod4.1
Applied distribute-lft-in4.1
Simplified2.9
if 203.2754817400328 < y < 2.946589273213929e+120Initial program 36.5
rmApplied add-cube-cbrt24.5
Applied associate-/r*24.6
Final simplification5.0
herbie shell --seed 2019297
(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))