\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 30175644937213604838506496:\\
\;\;\;\;\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}}{\left(\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt[3]{x + y}}}\right)}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r373858 = x;
double r373859 = y;
double r373860 = r373858 + r373859;
double r373861 = r373858 / r373860;
double r373862 = log(r373861);
double r373863 = r373858 * r373862;
double r373864 = exp(r373863);
double r373865 = r373864 / r373858;
return r373865;
}
double f(double x, double y) {
double r373866 = y;
double r373867 = 3.0175644937213605e+25;
bool r373868 = r373866 <= r373867;
double r373869 = x;
double r373870 = 2.0;
double r373871 = cbrt(r373869);
double r373872 = r373869 + r373866;
double r373873 = cbrt(r373872);
double r373874 = r373871 / r373873;
double r373875 = log(r373874);
double r373876 = r373870 * r373875;
double r373877 = r373869 * r373876;
double r373878 = r373869 * r373875;
double r373879 = r373877 + r373878;
double r373880 = exp(r373879);
double r373881 = r373880 / r373869;
double r373882 = cbrt(r373873);
double r373883 = r373882 * r373882;
double r373884 = r373873 * r373873;
double r373885 = cbrt(r373884);
double r373886 = cbrt(r373885);
double r373887 = cbrt(r373882);
double r373888 = r373886 * r373887;
double r373889 = r373883 * r373888;
double r373890 = r373871 / r373889;
double r373891 = log(r373890);
double r373892 = r373870 * r373891;
double r373893 = r373869 * r373892;
double r373894 = r373893 + r373878;
double r373895 = exp(r373894);
double r373896 = r373895 / r373869;
double r373897 = r373868 ? r373881 : r373896;
return r373897;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.2 |
| Herbie | 4.1 |
if y < 3.0175644937213605e+25Initial program 5.2
rmApplied add-cube-cbrt29.1
Applied add-cube-cbrt5.2
Applied times-frac5.2
Applied log-prod2.4
Applied distribute-lft-in2.4
Simplified1.7
if 3.0175644937213605e+25 < y Initial program 31.8
rmApplied add-cube-cbrt24.0
Applied add-cube-cbrt31.9
Applied times-frac31.9
Applied log-prod22.5
Applied distribute-lft-in22.5
Simplified19.6
rmApplied add-cube-cbrt12.5
rmApplied add-cube-cbrt12.4
Applied cbrt-prod12.4
Applied cbrt-prod12.5
Final simplification4.1
herbie shell --seed 2019353 +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))