\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.82478823432214161812668457202583340491 \cdot 10^{60} \lor \neg \left(x \le 3.919013061791306373748966507264412939548\right):\\
\;\;\;\;\frac{1}{x} \cdot e^{-y}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r329943 = x;
double r329944 = y;
double r329945 = r329943 + r329944;
double r329946 = r329943 / r329945;
double r329947 = log(r329946);
double r329948 = r329943 * r329947;
double r329949 = exp(r329948);
double r329950 = r329949 / r329943;
return r329950;
}
double f(double x, double y) {
double r329951 = x;
double r329952 = -1.8247882343221416e+60;
bool r329953 = r329951 <= r329952;
double r329954 = 3.9190130617913064;
bool r329955 = r329951 <= r329954;
double r329956 = !r329955;
bool r329957 = r329953 || r329956;
double r329958 = 1.0;
double r329959 = r329958 / r329951;
double r329960 = y;
double r329961 = -r329960;
double r329962 = exp(r329961);
double r329963 = r329959 * r329962;
double r329964 = cbrt(r329951);
double r329965 = r329960 + r329951;
double r329966 = cbrt(r329965);
double r329967 = r329964 / r329966;
double r329968 = pow(r329967, r329951);
double r329969 = r329968 * r329968;
double r329970 = r329968 / r329951;
double r329971 = r329969 * r329970;
double r329972 = r329957 ? r329963 : r329971;
return r329972;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.7 |
|---|---|
| Target | 8.0 |
| Herbie | 0.1 |
if x < -1.8247882343221416e+60 or 3.9190130617913064 < x Initial program 11.7
Simplified11.7
Taylor expanded around inf 0.0
rmApplied div-inv0.0
if -1.8247882343221416e+60 < x < 3.9190130617913064Initial program 9.8
Simplified9.8
rmApplied *-un-lft-identity9.8
Applied add-cube-cbrt12.6
Applied add-cube-cbrt9.8
Applied times-frac9.8
Applied unpow-prod-down2.0
Applied times-frac2.0
Simplified2.0
rmApplied unpow-prod-down0.2
Final simplification0.1
herbie shell --seed 2019194
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))