\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.15064441356617753 \lor \neg \left(x \le 6.441277885744034\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\sqrt[3]{x}}\\
\end{array}double f(double x, double y) {
double r499249 = x;
double r499250 = y;
double r499251 = r499249 + r499250;
double r499252 = r499249 / r499251;
double r499253 = log(r499252);
double r499254 = r499249 * r499253;
double r499255 = exp(r499254);
double r499256 = r499255 / r499249;
return r499256;
}
double f(double x, double y) {
double r499257 = x;
double r499258 = -7.1506444135661775;
bool r499259 = r499257 <= r499258;
double r499260 = 6.441277885744034;
bool r499261 = r499257 <= r499260;
double r499262 = !r499261;
bool r499263 = r499259 || r499262;
double r499264 = y;
double r499265 = -r499264;
double r499266 = exp(r499265);
double r499267 = r499266 / r499257;
double r499268 = cbrt(r499257);
double r499269 = r499257 + r499264;
double r499270 = cbrt(r499269);
double r499271 = r499268 / r499270;
double r499272 = fabs(r499271);
double r499273 = pow(r499272, r499257);
double r499274 = r499273 * r499273;
double r499275 = r499268 * r499268;
double r499276 = r499274 / r499275;
double r499277 = pow(r499271, r499257);
double r499278 = r499277 / r499268;
double r499279 = r499276 * r499278;
double r499280 = r499263 ? r499267 : r499279;
return r499280;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.2 |
| Herbie | 0.7 |
if x < -7.1506444135661775 or 6.441277885744034 < x Initial program 10.9
Simplified10.9
Taylor expanded around inf 0.0
if -7.1506444135661775 < x < 6.441277885744034Initial program 11.7
Simplified11.7
rmApplied add-cube-cbrt12.8
Applied add-cube-cbrt12.8
Applied add-cube-cbrt12.8
Applied times-frac12.8
Applied unpow-prod-down4.0
Applied times-frac4.0
rmApplied add-sqr-sqrt4.0
Applied unpow-prod-down4.0
Simplified4.0
Simplified1.5
Final simplification0.7
herbie shell --seed 2020042 +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.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))