\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 304120122871191616:\\
\;\;\;\;\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{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{x + y}}\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 r450837 = x;
double r450838 = y;
double r450839 = r450837 + r450838;
double r450840 = r450837 / r450839;
double r450841 = log(r450840);
double r450842 = r450837 * r450841;
double r450843 = exp(r450842);
double r450844 = r450843 / r450837;
return r450844;
}
double f(double x, double y) {
double r450845 = y;
double r450846 = 3.041201228711916e+17;
bool r450847 = r450845 <= r450846;
double r450848 = x;
double r450849 = 2.0;
double r450850 = cbrt(r450848);
double r450851 = r450848 + r450845;
double r450852 = cbrt(r450851);
double r450853 = r450850 / r450852;
double r450854 = log(r450853);
double r450855 = r450849 * r450854;
double r450856 = r450848 * r450855;
double r450857 = r450848 * r450854;
double r450858 = r450856 + r450857;
double r450859 = exp(r450858);
double r450860 = r450859 / r450848;
double r450861 = cbrt(r450850);
double r450862 = r450861 * r450861;
double r450863 = r450862 * r450861;
double r450864 = r450863 / r450852;
double r450865 = log(r450864);
double r450866 = r450849 * r450865;
double r450867 = r450848 * r450866;
double r450868 = r450867 + r450857;
double r450869 = exp(r450868);
double r450870 = r450869 / r450848;
double r450871 = r450847 ? r450860 : r450870;
return r450871;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 7.7 |
| Herbie | 3.8 |
if y < 3.041201228711916e+17Initial program 5.1
rmApplied add-cube-cbrt29.4
Applied add-cube-cbrt5.1
Applied times-frac5.1
Applied log-prod2.0
Applied distribute-lft-in2.0
Simplified1.3
if 3.041201228711916e+17 < y Initial program 31.8
rmApplied add-cube-cbrt24.3
Applied add-cube-cbrt31.9
Applied times-frac31.9
Applied log-prod22.5
Applied distribute-lft-in22.5
Simplified20.6
rmApplied add-cube-cbrt12.6
Final simplification3.8
herbie shell --seed 2020003
(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))