\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.122144077215159 \cdot 10^{+68}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 12.791495951037414:\\
\;\;\;\;e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)} \cdot \frac{e^{\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r15463869 = x;
double r15463870 = y;
double r15463871 = r15463869 + r15463870;
double r15463872 = r15463869 / r15463871;
double r15463873 = log(r15463872);
double r15463874 = r15463869 * r15463873;
double r15463875 = exp(r15463874);
double r15463876 = r15463875 / r15463869;
return r15463876;
}
double f(double x, double y) {
double r15463877 = x;
double r15463878 = -2.122144077215159e+68;
bool r15463879 = r15463877 <= r15463878;
double r15463880 = y;
double r15463881 = -r15463880;
double r15463882 = exp(r15463881);
double r15463883 = r15463882 / r15463877;
double r15463884 = 12.791495951037414;
bool r15463885 = r15463877 <= r15463884;
double r15463886 = cbrt(r15463877);
double r15463887 = r15463880 + r15463877;
double r15463888 = cbrt(r15463887);
double r15463889 = r15463886 / r15463888;
double r15463890 = log(r15463889);
double r15463891 = r15463890 + r15463890;
double r15463892 = r15463877 * r15463891;
double r15463893 = exp(r15463892);
double r15463894 = r15463890 * r15463877;
double r15463895 = exp(r15463894);
double r15463896 = r15463895 / r15463877;
double r15463897 = r15463893 * r15463896;
double r15463898 = r15463885 ? r15463897 : r15463883;
double r15463899 = r15463879 ? r15463883 : r15463898;
return r15463899;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
if x < -2.122144077215159e+68 or 12.791495951037414 < x Initial program 11.3
Taylor expanded around inf 0.0
Simplified0.0
if -2.122144077215159e+68 < x < 12.791495951037414Initial program 10.4
rmApplied *-un-lft-identity10.4
Applied add-cube-cbrt14.0
Applied add-cube-cbrt10.4
Applied times-frac10.4
Applied log-prod2.5
Applied distribute-lft-in2.5
Applied exp-sum2.5
Applied times-frac2.5
rmApplied times-frac2.5
Applied log-prod0.4
Final simplification0.2
herbie shell --seed 2019158 +o rules:numerics
(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))