\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 74347.0824335901:\\
\;\;\;\;\frac{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot e^{\log \left(\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\end{array}double f(double x, double y) {
double r22691252 = x;
double r22691253 = y;
double r22691254 = r22691252 + r22691253;
double r22691255 = r22691252 / r22691254;
double r22691256 = log(r22691255);
double r22691257 = r22691252 * r22691256;
double r22691258 = exp(r22691257);
double r22691259 = r22691258 / r22691252;
return r22691259;
}
double f(double x, double y) {
double r22691260 = y;
double r22691261 = 74347.0824335901;
bool r22691262 = r22691260 <= r22691261;
double r22691263 = x;
double r22691264 = cbrt(r22691263);
double r22691265 = r22691263 + r22691260;
double r22691266 = cbrt(r22691265);
double r22691267 = r22691264 / r22691266;
double r22691268 = log(r22691267);
double r22691269 = r22691268 + r22691268;
double r22691270 = r22691268 + r22691269;
double r22691271 = r22691270 * r22691263;
double r22691272 = exp(r22691271);
double r22691273 = r22691272 / r22691263;
double r22691274 = cbrt(r22691264);
double r22691275 = r22691264 * r22691264;
double r22691276 = cbrt(r22691275);
double r22691277 = log(r22691276);
double r22691278 = exp(r22691277);
double r22691279 = r22691274 * r22691278;
double r22691280 = r22691279 / r22691266;
double r22691281 = log(r22691280);
double r22691282 = r22691269 + r22691281;
double r22691283 = r22691263 * r22691282;
double r22691284 = exp(r22691283);
double r22691285 = r22691284 / r22691263;
double r22691286 = r22691262 ? r22691273 : r22691285;
return r22691286;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.6 |
|---|---|
| Target | 7.7 |
| Herbie | 3.2 |
if y < 74347.0824335901Initial program 4.1
rmApplied add-cube-cbrt28.5
Applied add-cube-cbrt4.1
Applied times-frac4.1
Applied log-prod1.5
Simplified0.9
if 74347.0824335901 < y Initial program 32.8
rmApplied add-cube-cbrt24.9
Applied add-cube-cbrt32.8
Applied times-frac32.8
Applied log-prod24.0
Simplified21.2
rmApplied add-cube-cbrt17.8
Applied cbrt-prod14.1
rmApplied add-exp-log11.3
Final simplification3.2
herbie shell --seed 2019164
(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))