\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1860105.13926821737550199031829833984375 \lor \neg \left(x \le 1.395973540143734537011255270044784992933\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r270951 = x;
double r270952 = y;
double r270953 = r270951 + r270952;
double r270954 = r270951 / r270953;
double r270955 = log(r270954);
double r270956 = r270951 * r270955;
double r270957 = exp(r270956);
double r270958 = r270957 / r270951;
return r270958;
}
double f(double x, double y) {
double r270959 = x;
double r270960 = -1860105.1392682174;
bool r270961 = r270959 <= r270960;
double r270962 = 1.3959735401437345;
bool r270963 = r270959 <= r270962;
double r270964 = !r270963;
bool r270965 = r270961 || r270964;
double r270966 = y;
double r270967 = -r270966;
double r270968 = exp(r270967);
double r270969 = r270968 / r270959;
double r270970 = 2.0;
double r270971 = cbrt(r270959);
double r270972 = r270959 + r270966;
double r270973 = cbrt(r270972);
double r270974 = r270971 / r270973;
double r270975 = log(r270974);
double r270976 = r270970 * r270975;
double r270977 = r270959 * r270976;
double r270978 = exp(r270977);
double r270979 = pow(r270974, r270959);
double r270980 = r270978 * r270979;
double r270981 = r270980 / r270959;
double r270982 = r270965 ? r270969 : r270981;
return r270982;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.8 |
| Herbie | 0.0 |
if x < -1860105.1392682174 or 1.3959735401437345 < x Initial program 10.4
Simplified10.4
Taylor expanded around inf 0.0
if -1860105.1392682174 < x < 1.3959735401437345Initial program 11.6
Simplified11.6
rmApplied add-cube-cbrt11.6
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down2.2
rmApplied add-exp-log33.9
Applied add-exp-log33.9
Applied prod-exp33.9
Applied add-exp-log33.9
Applied add-exp-log33.9
Applied prod-exp33.9
Applied div-exp33.9
Applied pow-exp32.8
Simplified0.0
Final simplification0.0
herbie shell --seed 2019235 +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.73118442066479561e94) (/ (exp (/ -1 y)) x) (if (< y 2.81795924272828789e37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))