\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2375445713.20731258392333984375 \lor \neg \left(x \le 3.548587978717038016185369997401721775532\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r325191 = x;
double r325192 = y;
double r325193 = r325191 + r325192;
double r325194 = r325191 / r325193;
double r325195 = log(r325194);
double r325196 = r325191 * r325195;
double r325197 = exp(r325196);
double r325198 = r325197 / r325191;
return r325198;
}
double f(double x, double y) {
double r325199 = x;
double r325200 = -2375445713.2073126;
bool r325201 = r325199 <= r325200;
double r325202 = 3.548587978717038;
bool r325203 = r325199 <= r325202;
double r325204 = !r325203;
bool r325205 = r325201 || r325204;
double r325206 = 1.0;
double r325207 = y;
double r325208 = exp(r325207);
double r325209 = r325199 * r325208;
double r325210 = r325206 / r325209;
double r325211 = 2.0;
double r325212 = cbrt(r325199);
double r325213 = r325199 + r325207;
double r325214 = cbrt(r325213);
double r325215 = r325212 / r325214;
double r325216 = log(r325215);
double r325217 = r325211 * r325216;
double r325218 = r325199 * r325217;
double r325219 = exp(r325218);
double r325220 = pow(r325215, r325199);
double r325221 = r325219 * r325220;
double r325222 = r325221 / r325199;
double r325223 = r325205 ? r325210 : r325222;
return r325223;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.0 |
| Herbie | 0.0 |
if x < -2375445713.2073126 or 3.548587978717038 < x Initial program 10.6
Simplified10.6
Taylor expanded around inf 0.0
rmApplied neg-sub00.0
Applied exp-diff0.0
Applied associate-/l/0.0
if -2375445713.2073126 < x < 3.548587978717038Initial program 11.5
Simplified11.5
rmApplied add-cube-cbrt11.6
Applied add-cube-cbrt11.5
Applied times-frac11.5
Applied unpow-prod-down2.6
rmApplied add-exp-log33.7
Applied add-exp-log33.7
Applied prod-exp33.7
Applied add-exp-log33.7
Applied add-exp-log33.7
Applied prod-exp33.7
Applied div-exp33.7
Applied pow-exp32.6
Simplified0.0
Final simplification0.0
herbie shell --seed 2019304 +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.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))