\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 7.289916210907466442847635335056111216545:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{x + y}{\sqrt[3]{x}}}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r17000775 = x;
double r17000776 = y;
double r17000777 = r17000775 + r17000776;
double r17000778 = r17000775 / r17000777;
double r17000779 = log(r17000778);
double r17000780 = r17000775 * r17000779;
double r17000781 = exp(r17000780);
double r17000782 = r17000781 / r17000775;
return r17000782;
}
double f(double x, double y) {
double r17000783 = y;
double r17000784 = 7.289916210907466;
bool r17000785 = r17000783 <= r17000784;
double r17000786 = 1.0;
double r17000787 = x;
double r17000788 = r17000786 / r17000787;
double r17000789 = cbrt(r17000787);
double r17000790 = r17000789 * r17000789;
double r17000791 = r17000787 + r17000783;
double r17000792 = r17000791 / r17000789;
double r17000793 = r17000790 / r17000792;
double r17000794 = log(r17000793);
double r17000795 = r17000794 * r17000787;
double r17000796 = exp(r17000795);
double r17000797 = r17000796 / r17000787;
double r17000798 = r17000785 ? r17000788 : r17000797;
return r17000798;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 8.2 |
| Herbie | 7.0 |
if y < 7.289916210907466Initial program 4.6
Taylor expanded around inf 1.1
if 7.289916210907466 < y Initial program 31.8
rmApplied add-cube-cbrt25.4
Applied associate-/l*25.5
Final simplification7.0
herbie shell --seed 2019192 +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.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))