\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 63650307679534716100354087104615030980610 \lor \neg \left(y \le 1.320595172649293990309836056567813281437 \cdot 10^{157}\right):\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{x}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r265137 = x;
double r265138 = y;
double r265139 = r265137 + r265138;
double r265140 = r265137 / r265139;
double r265141 = log(r265140);
double r265142 = r265137 * r265141;
double r265143 = exp(r265142);
double r265144 = r265143 / r265137;
return r265144;
}
double f(double x, double y) {
double r265145 = y;
double r265146 = 6.365030767953472e+40;
bool r265147 = r265145 <= r265146;
double r265148 = 1.320595172649294e+157;
bool r265149 = r265145 <= r265148;
double r265150 = !r265149;
bool r265151 = r265147 || r265150;
double r265152 = x;
double r265153 = 2.0;
double r265154 = cbrt(r265152);
double r265155 = r265152 + r265145;
double r265156 = cbrt(r265155);
double r265157 = r265154 / r265156;
double r265158 = log(r265157);
double r265159 = r265153 * r265158;
double r265160 = r265152 * r265159;
double r265161 = r265152 * r265158;
double r265162 = r265160 + r265161;
double r265163 = exp(r265162);
double r265164 = r265163 / r265152;
double r265165 = 1.0;
double r265166 = r265156 * r265156;
double r265167 = r265165 / r265166;
double r265168 = r265152 / r265156;
double r265169 = r265167 * r265168;
double r265170 = log(r265169);
double r265171 = r265152 * r265170;
double r265172 = exp(r265171);
double r265173 = r265172 / r265152;
double r265174 = r265151 ? r265164 : r265173;
return r265174;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 8.1 |
| Herbie | 5.3 |
if y < 6.365030767953472e+40 or 1.320595172649294e+157 < y Initial program 8.7
rmApplied add-cube-cbrt28.1
Applied add-cube-cbrt8.7
Applied times-frac8.7
Applied log-prod4.5
Applied distribute-lft-in4.5
Simplified3.4
if 6.365030767953472e+40 < y < 1.320595172649294e+157Initial program 34.3
rmApplied add-cube-cbrt22.5
Applied *-un-lft-identity22.5
Applied times-frac22.6
Final simplification5.3
herbie shell --seed 2019298
(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))