\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 227.4569151677616218876210041344165802002 \lor \neg \left(y \le 1.480529159109445059080956924684942271604 \cdot 10^{146}\right):\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{x}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r488257 = x;
double r488258 = y;
double r488259 = r488257 + r488258;
double r488260 = r488257 / r488259;
double r488261 = log(r488260);
double r488262 = r488257 * r488261;
double r488263 = exp(r488262);
double r488264 = r488263 / r488257;
return r488264;
}
double f(double x, double y) {
double r488265 = y;
double r488266 = 227.45691516776162;
bool r488267 = r488265 <= r488266;
double r488268 = 1.480529159109445e+146;
bool r488269 = r488265 <= r488268;
double r488270 = !r488269;
bool r488271 = r488267 || r488270;
double r488272 = x;
double r488273 = 2.0;
double r488274 = cbrt(r488272);
double r488275 = r488272 + r488265;
double r488276 = cbrt(r488275);
double r488277 = r488274 / r488276;
double r488278 = log(r488277);
double r488279 = r488273 * r488278;
double r488280 = r488279 + r488278;
double r488281 = r488272 * r488280;
double r488282 = exp(r488281);
double r488283 = r488282 / r488272;
double r488284 = 1.0;
double r488285 = r488276 * r488276;
double r488286 = r488284 / r488285;
double r488287 = r488272 / r488276;
double r488288 = r488286 * r488287;
double r488289 = log(r488288);
double r488290 = r488272 * r488289;
double r488291 = exp(r488290);
double r488292 = r488291 / r488272;
double r488293 = r488271 ? r488283 : r488292;
return r488293;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.7 |
| Herbie | 4.6 |
if y < 227.45691516776162 or 1.480529159109445e+146 < y Initial program 7.8
rmApplied add-cube-cbrt28.1
Applied add-cube-cbrt7.8
Applied times-frac7.8
Applied log-prod3.5
Simplified2.1
if 227.45691516776162 < y < 1.480529159109445e+146Initial program 34.5
rmApplied add-cube-cbrt23.2
Applied *-un-lft-identity23.2
Applied times-frac23.2
Final simplification4.6
herbie shell --seed 2020001
(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))