\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 20266945466.267704010009765625:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\left(\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}\right) \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r494735 = x;
double r494736 = y;
double r494737 = r494735 + r494736;
double r494738 = r494735 / r494737;
double r494739 = log(r494738);
double r494740 = r494735 * r494739;
double r494741 = exp(r494740);
double r494742 = r494741 / r494735;
return r494742;
}
double f(double x, double y) {
double r494743 = y;
double r494744 = 20266945466.267704;
bool r494745 = r494743 <= r494744;
double r494746 = x;
double r494747 = 2.0;
double r494748 = cbrt(r494746);
double r494749 = r494746 + r494743;
double r494750 = cbrt(r494749);
double r494751 = r494748 / r494750;
double r494752 = log(r494751);
double r494753 = r494747 * r494752;
double r494754 = r494746 * r494753;
double r494755 = r494746 * r494752;
double r494756 = r494754 + r494755;
double r494757 = exp(r494756);
double r494758 = r494757 / r494746;
double r494759 = cbrt(r494750);
double r494760 = r494759 * r494759;
double r494761 = r494760 * r494759;
double r494762 = r494748 / r494761;
double r494763 = log(r494762);
double r494764 = r494746 * r494763;
double r494765 = r494754 + r494764;
double r494766 = exp(r494765);
double r494767 = r494766 / r494746;
double r494768 = r494745 ? r494758 : r494767;
return r494768;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.0 |
| Herbie | 3.9 |
if y < 20266945466.267704Initial program 5.1
rmApplied add-cube-cbrt28.7
Applied add-cube-cbrt5.1
Applied times-frac5.1
Applied log-prod2.1
Applied distribute-lft-in2.1
Simplified1.4
if 20266945466.267704 < y Initial program 32.3
rmApplied add-cube-cbrt24.5
Applied add-cube-cbrt32.3
Applied times-frac32.3
Applied log-prod23.0
Applied distribute-lft-in23.0
Simplified20.5
rmApplied add-cube-cbrt12.4
Final simplification3.9
herbie shell --seed 2019362 +o rules:numerics
(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))