\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.371891914955366 \cdot 10^{41} \lor \neg \left(x \le 6.5526303521982673 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r393742 = x;
double r393743 = y;
double r393744 = r393742 + r393743;
double r393745 = r393742 / r393744;
double r393746 = log(r393745);
double r393747 = r393742 * r393746;
double r393748 = exp(r393747);
double r393749 = r393748 / r393742;
return r393749;
}
double f(double x, double y) {
double r393750 = x;
double r393751 = -3.371891914955366e+41;
bool r393752 = r393750 <= r393751;
double r393753 = 6.552630352198267e-06;
bool r393754 = r393750 <= r393753;
double r393755 = !r393754;
bool r393756 = r393752 || r393755;
double r393757 = y;
double r393758 = -r393757;
double r393759 = exp(r393758);
double r393760 = r393759 / r393750;
double r393761 = cbrt(r393750);
double r393762 = r393750 + r393757;
double r393763 = cbrt(r393762);
double r393764 = r393761 / r393763;
double r393765 = pow(r393764, r393750);
double r393766 = r393765 * r393765;
double r393767 = r393766 * r393765;
double r393768 = r393767 / r393750;
double r393769 = r393756 ? r393760 : r393768;
return r393769;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 8.2 |
| Herbie | 0.2 |
if x < -3.371891914955366e+41 or 6.552630352198267e-06 < x Initial program 11.0
Simplified11.0
Taylor expanded around inf 0.3
if -3.371891914955366e+41 < x < 6.552630352198267e-06Initial program 10.8
Simplified10.7
rmApplied add-cube-cbrt12.7
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.4
rmApplied times-frac2.4
Applied unpow-prod-down0.2
Final simplification0.2
herbie shell --seed 2020047 +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))