\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 74.53422455714195:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\frac{\frac{x}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r18312663 = x;
double r18312664 = y;
double r18312665 = r18312663 + r18312664;
double r18312666 = r18312663 / r18312665;
double r18312667 = log(r18312666);
double r18312668 = r18312663 * r18312667;
double r18312669 = exp(r18312668);
double r18312670 = r18312669 / r18312663;
return r18312670;
}
double f(double x, double y) {
double r18312671 = y;
double r18312672 = 74.53422455714195;
bool r18312673 = r18312671 <= r18312672;
double r18312674 = 1.0;
double r18312675 = x;
double r18312676 = r18312674 / r18312675;
double r18312677 = r18312675 + r18312671;
double r18312678 = cbrt(r18312677);
double r18312679 = r18312678 * r18312678;
double r18312680 = r18312675 / r18312679;
double r18312681 = r18312680 / r18312678;
double r18312682 = log(r18312681);
double r18312683 = r18312682 * r18312675;
double r18312684 = exp(r18312683);
double r18312685 = r18312684 / r18312675;
double r18312686 = r18312673 ? r18312676 : r18312685;
return r18312686;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.6 |
|---|---|
| Target | 7.7 |
| Herbie | 6.5 |
if y < 74.53422455714195Initial program 4.0
Taylor expanded around inf 1.0
if 74.53422455714195 < y Initial program 32.8
rmApplied add-cube-cbrt24.9
Applied associate-/r*24.9
Final simplification6.5
herbie shell --seed 2019164 +o rules:numerics
(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))