\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 526918.3282767582:\\
\;\;\;\;\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(\log \left(\frac{\left(\left(\sqrt[3]{x}\right)\right)}{\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)}}{x}\\
\end{array}double f(double x, double y) {
double r8754849 = x;
double r8754850 = y;
double r8754851 = r8754849 + r8754850;
double r8754852 = r8754849 / r8754851;
double r8754853 = log(r8754852);
double r8754854 = r8754849 * r8754853;
double r8754855 = exp(r8754854);
double r8754856 = r8754855 / r8754849;
return r8754856;
}
double f(double x, double y) {
double r8754857 = y;
double r8754858 = 526918.3282767582;
bool r8754859 = r8754857 <= r8754858;
double r8754860 = x;
double r8754861 = cbrt(r8754860);
double r8754862 = r8754860 + r8754857;
double r8754863 = cbrt(r8754862);
double r8754864 = r8754861 / r8754863;
double r8754865 = log(r8754864);
double r8754866 = r8754865 + r8754865;
double r8754867 = r8754865 + r8754866;
double r8754868 = r8754867 * r8754860;
double r8754869 = exp(r8754868);
double r8754870 = r8754869 / r8754860;
double r8754871 = /* ERROR: no posit support in C */;
double r8754872 = /* ERROR: no posit support in C */;
double r8754873 = r8754872 / r8754863;
double r8754874 = log(r8754873);
double r8754875 = r8754874 + r8754866;
double r8754876 = r8754860 * r8754875;
double r8754877 = exp(r8754876);
double r8754878 = r8754877 / r8754860;
double r8754879 = r8754859 ? r8754870 : r8754878;
return r8754879;
}




Bits error versus x




Bits error versus y
| Original | 11.1 |
|---|---|
| Target | 7.4 |
| Herbie | 3.8 |
if y < 526918.3282767582Initial program 4.4
rmApplied add-cube-cbrt28.0
Applied add-cube-cbrt4.4
Applied times-frac4.4
Applied log-prod1.6
rmApplied times-frac1.6
Applied log-prod1.0
if 526918.3282767582 < y Initial program 33.0
rmApplied add-cube-cbrt24.4
Applied add-cube-cbrt33.1
Applied times-frac33.1
Applied log-prod23.8
rmApplied times-frac23.8
Applied log-prod21.6
rmApplied insert-posit1613.0
Final simplification3.8
herbie shell --seed 2019156
(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))