\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -72249487565711714357348322366193664:\\
\;\;\;\;\frac{1}{x} \cdot e^{-y}\\
\mathbf{elif}\;x \le 95.6145486156965489499270915985107421875:\\
\;\;\;\;e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)\right)} \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x} \cdot e^{-y}\\
\end{array}double f(double x, double y) {
double r15972162 = x;
double r15972163 = y;
double r15972164 = r15972162 + r15972163;
double r15972165 = r15972162 / r15972164;
double r15972166 = log(r15972165);
double r15972167 = r15972162 * r15972166;
double r15972168 = exp(r15972167);
double r15972169 = r15972168 / r15972162;
return r15972169;
}
double f(double x, double y) {
double r15972170 = x;
double r15972171 = -7.224948756571171e+34;
bool r15972172 = r15972170 <= r15972171;
double r15972173 = 1.0;
double r15972174 = r15972173 / r15972170;
double r15972175 = y;
double r15972176 = -r15972175;
double r15972177 = exp(r15972176);
double r15972178 = r15972174 * r15972177;
double r15972179 = 95.61454861569655;
bool r15972180 = r15972170 <= r15972179;
double r15972181 = cbrt(r15972170);
double r15972182 = r15972175 + r15972170;
double r15972183 = cbrt(r15972182);
double r15972184 = r15972181 / r15972183;
double r15972185 = log(r15972184);
double r15972186 = r15972185 + r15972185;
double r15972187 = r15972185 + r15972186;
double r15972188 = r15972170 * r15972187;
double r15972189 = exp(r15972188);
double r15972190 = r15972189 * r15972174;
double r15972191 = r15972180 ? r15972190 : r15972178;
double r15972192 = r15972172 ? r15972178 : r15972191;
return r15972192;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.6 |
| Herbie | 0.0 |
if x < -7.224948756571171e+34 or 95.61454861569655 < x Initial program 11.2
Taylor expanded around inf 0.0
Simplified0.0
rmApplied div-inv0.0
if -7.224948756571171e+34 < x < 95.61454861569655Initial program 10.5
rmApplied div-inv10.5
rmApplied add-cube-cbrt12.1
Applied add-cube-cbrt10.5
Applied times-frac10.5
Applied log-prod1.8
Simplified0.1
Final simplification0.0
herbie shell --seed 2019172 +o rules:numerics
(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))