\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 19.75641587680443:\\
\;\;\;\;\frac{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x + x \cdot \left(\log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r22438291 = x;
double r22438292 = y;
double r22438293 = r22438291 + r22438292;
double r22438294 = r22438291 / r22438293;
double r22438295 = log(r22438294);
double r22438296 = r22438291 * r22438295;
double r22438297 = exp(r22438296);
double r22438298 = r22438297 / r22438291;
return r22438298;
}
double f(double x, double y) {
double r22438299 = y;
double r22438300 = 19.75641587680443;
bool r22438301 = r22438299 <= r22438300;
double r22438302 = x;
double r22438303 = cbrt(r22438302);
double r22438304 = r22438302 + r22438299;
double r22438305 = cbrt(r22438304);
double r22438306 = r22438303 / r22438305;
double r22438307 = log(r22438306);
double r22438308 = r22438307 * r22438302;
double r22438309 = r22438308 + r22438308;
double r22438310 = r22438309 + r22438308;
double r22438311 = exp(r22438310);
double r22438312 = r22438311 / r22438302;
double r22438313 = cbrt(r22438303);
double r22438314 = cbrt(r22438305);
double r22438315 = r22438313 / r22438314;
double r22438316 = log(r22438315);
double r22438317 = r22438313 * r22438313;
double r22438318 = r22438305 * r22438305;
double r22438319 = cbrt(r22438318);
double r22438320 = r22438317 / r22438319;
double r22438321 = log(r22438320);
double r22438322 = r22438316 + r22438321;
double r22438323 = r22438302 * r22438322;
double r22438324 = r22438308 + r22438323;
double r22438325 = r22438324 + r22438308;
double r22438326 = exp(r22438325);
double r22438327 = r22438326 / r22438302;
double r22438328 = r22438301 ? r22438312 : r22438327;
return r22438328;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.9 |
| Herbie | 4.0 |
if y < 19.75641587680443Initial program 4.5
rmApplied add-cube-cbrt28.4
Applied add-cube-cbrt4.5
Applied times-frac4.5
Applied log-prod1.7
Applied distribute-lft-in1.7
Simplified0.9
if 19.75641587680443 < y Initial program 33.3
rmApplied add-cube-cbrt24.5
Applied add-cube-cbrt33.3
Applied times-frac33.3
Applied log-prod23.9
Applied distribute-lft-in23.9
Simplified21.7
rmApplied add-cube-cbrt18.6
Applied cbrt-prod14.8
Applied add-cube-cbrt14.2
Applied times-frac13.8
Applied log-prod13.8
Final simplification4.0
herbie shell --seed 2019163
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))