\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -8.159628703454281 \cdot 10^{+100}:\\
\;\;\;\;\frac{\sqrt{e^{-y}}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\sqrt{e^{-y}}}{\sqrt[3]{x}}\\
\mathbf{elif}\;x \le 7.89192717712585 \cdot 10^{+49}:\\
\;\;\;\;\frac{{\left(e^{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)}^{\left(\log \left(\frac{x}{y + x}\right) \cdot \sqrt[3]{x}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{e^{-y}}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\sqrt{e^{-y}}}{\sqrt[3]{x}}\\
\end{array}double f(double x, double y) {
double r22409172 = x;
double r22409173 = y;
double r22409174 = r22409172 + r22409173;
double r22409175 = r22409172 / r22409174;
double r22409176 = log(r22409175);
double r22409177 = r22409172 * r22409176;
double r22409178 = exp(r22409177);
double r22409179 = r22409178 / r22409172;
return r22409179;
}
double f(double x, double y) {
double r22409180 = x;
double r22409181 = -8.159628703454281e+100;
bool r22409182 = r22409180 <= r22409181;
double r22409183 = y;
double r22409184 = -r22409183;
double r22409185 = exp(r22409184);
double r22409186 = sqrt(r22409185);
double r22409187 = cbrt(r22409180);
double r22409188 = r22409187 * r22409187;
double r22409189 = r22409186 / r22409188;
double r22409190 = r22409186 / r22409187;
double r22409191 = r22409189 * r22409190;
double r22409192 = 7.89192717712585e+49;
bool r22409193 = r22409180 <= r22409192;
double r22409194 = exp(r22409188);
double r22409195 = r22409183 + r22409180;
double r22409196 = r22409180 / r22409195;
double r22409197 = log(r22409196);
double r22409198 = r22409197 * r22409187;
double r22409199 = pow(r22409194, r22409198);
double r22409200 = r22409199 / r22409180;
double r22409201 = r22409193 ? r22409200 : r22409191;
double r22409202 = r22409182 ? r22409191 : r22409201;
return r22409202;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.9 |
| Herbie | 0.9 |
if x < -8.159628703454281e+100 or 7.89192717712585e+49 < x Initial program 13.4
Taylor expanded around inf 0.0
Simplified0.0
rmApplied add-cube-cbrt0.9
Applied add-sqr-sqrt0.9
Applied times-frac0.9
if -8.159628703454281e+100 < x < 7.89192717712585e+49Initial program 9.6
rmApplied add-log-exp19.5
Applied exp-to-pow1.0
rmApplied add-cube-cbrt1.0
Applied exp-prod1.0
Applied pow-pow0.9
Final simplification0.9
herbie shell --seed 2019162
(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))