\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.3893711893619755 \cdot 10^{115}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 8.4574501416202074 \cdot 10^{-18}:\\
\;\;\;\;\frac{e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\end{array}double f(double x, double y) {
double r491977 = x;
double r491978 = y;
double r491979 = r491977 + r491978;
double r491980 = r491977 / r491979;
double r491981 = log(r491980);
double r491982 = r491977 * r491981;
double r491983 = exp(r491982);
double r491984 = r491983 / r491977;
return r491984;
}
double f(double x, double y) {
double r491985 = x;
double r491986 = -7.3893711893619755e+115;
bool r491987 = r491985 <= r491986;
double r491988 = 1.0;
double r491989 = y;
double r491990 = exp(r491989);
double r491991 = r491985 * r491990;
double r491992 = r491988 / r491991;
double r491993 = 8.457450141620207e-18;
bool r491994 = r491985 <= r491993;
double r491995 = cbrt(r491985);
double r491996 = r491995 * r491995;
double r491997 = r491985 + r491989;
double r491998 = cbrt(r491997);
double r491999 = r491998 * r491998;
double r492000 = r491996 / r491999;
double r492001 = log(r492000);
double r492002 = r491995 / r491998;
double r492003 = log(r492002);
double r492004 = r492001 + r492003;
double r492005 = r491985 * r492004;
double r492006 = exp(r492005);
double r492007 = r492006 / r491985;
double r492008 = -1.0;
double r492009 = r492008 * r491989;
double r492010 = exp(r492009);
double r492011 = r492010 / r491985;
double r492012 = r491994 ? r492007 : r492011;
double r492013 = r491987 ? r491992 : r492012;
return r492013;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.9 |
| Herbie | 1.9 |
if x < -7.3893711893619755e+115Initial program 14.6
Taylor expanded around inf 0.0
rmApplied clear-num0.0
Simplified0.0
if -7.3893711893619755e+115 < x < 8.457450141620207e-18Initial program 11.0
rmApplied add-cube-cbrt17.2
Applied add-cube-cbrt11.0
Applied times-frac11.0
Applied log-prod2.8
if 8.457450141620207e-18 < x Initial program 8.8
Taylor expanded around inf 1.3
Final simplification1.9
herbie shell --seed 2020081 +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))