\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 7.289916210907466442847635335056111216545:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{x + y}{\sqrt[3]{x}}}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r18200209 = x;
double r18200210 = y;
double r18200211 = r18200209 + r18200210;
double r18200212 = r18200209 / r18200211;
double r18200213 = log(r18200212);
double r18200214 = r18200209 * r18200213;
double r18200215 = exp(r18200214);
double r18200216 = r18200215 / r18200209;
return r18200216;
}
double f(double x, double y) {
double r18200217 = y;
double r18200218 = 7.289916210907466;
bool r18200219 = r18200217 <= r18200218;
double r18200220 = 1.0;
double r18200221 = x;
double r18200222 = r18200220 / r18200221;
double r18200223 = cbrt(r18200221);
double r18200224 = r18200223 * r18200223;
double r18200225 = r18200221 + r18200217;
double r18200226 = r18200225 / r18200223;
double r18200227 = r18200224 / r18200226;
double r18200228 = log(r18200227);
double r18200229 = r18200228 * r18200221;
double r18200230 = exp(r18200229);
double r18200231 = r18200230 / r18200221;
double r18200232 = r18200219 ? r18200222 : r18200231;
return r18200232;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 8.2 |
| Herbie | 7.0 |
if y < 7.289916210907466Initial program 4.6
Taylor expanded around inf 1.1
if 7.289916210907466 < y Initial program 31.8
rmApplied add-cube-cbrt25.4
Applied associate-/l*25.5
Final simplification7.0
herbie shell --seed 2019192
(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))