\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1860105.13926821737550199031829833984375 \lor \neg \left(x \le 1.395973540143734537011255270044784992933\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\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 r359094 = x;
double r359095 = y;
double r359096 = r359094 + r359095;
double r359097 = r359094 / r359096;
double r359098 = log(r359097);
double r359099 = r359094 * r359098;
double r359100 = exp(r359099);
double r359101 = r359100 / r359094;
return r359101;
}
double f(double x, double y) {
double r359102 = x;
double r359103 = -1860105.1392682174;
bool r359104 = r359102 <= r359103;
double r359105 = 1.3959735401437345;
bool r359106 = r359102 <= r359105;
double r359107 = !r359106;
bool r359108 = r359104 || r359107;
double r359109 = y;
double r359110 = -r359109;
double r359111 = exp(r359110);
double r359112 = r359111 / r359102;
double r359113 = 2.0;
double r359114 = cbrt(r359102);
double r359115 = r359102 + r359109;
double r359116 = cbrt(r359115);
double r359117 = r359114 / r359116;
double r359118 = log(r359117);
double r359119 = r359113 * r359118;
double r359120 = r359102 * r359119;
double r359121 = exp(r359120);
double r359122 = pow(r359117, r359102);
double r359123 = r359121 * r359122;
double r359124 = r359123 / r359102;
double r359125 = r359108 ? r359112 : r359124;
return r359125;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.8 |
| Herbie | 0.0 |
if x < -1860105.1392682174 or 1.3959735401437345 < x Initial program 10.4
Simplified10.4
Taylor expanded around inf 0.0
if -1860105.1392682174 < x < 1.3959735401437345Initial program 11.6
Simplified11.6
rmApplied add-cube-cbrt11.6
Applied add-cube-cbrt11.6
Applied times-frac11.6
Applied unpow-prod-down2.2
rmApplied add-exp-log33.9
Applied add-exp-log33.9
Applied prod-exp33.9
Applied add-exp-log33.9
Applied add-exp-log33.9
Applied prod-exp33.9
Applied div-exp33.9
Applied pow-exp32.8
Simplified0.0
Final simplification0.0
herbie shell --seed 2019235
(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))