\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{e^{\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot 2\right) \cdot x}}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right)} \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 r541200 = x;
double r541201 = y;
double r541202 = r541200 + r541201;
double r541203 = r541200 / r541202;
double r541204 = log(r541203);
double r541205 = r541200 * r541204;
double r541206 = exp(r541205);
double r541207 = r541206 / r541200;
return r541207;
}
double f(double x, double y) {
double r541208 = x;
double r541209 = -7.1506444135661775;
bool r541210 = r541208 <= r541209;
double r541211 = 6.441277885744034;
bool r541212 = r541208 <= r541211;
double r541213 = !r541212;
bool r541214 = r541210 || r541213;
double r541215 = y;
double r541216 = -r541215;
double r541217 = exp(r541216);
double r541218 = r541217 / r541208;
double r541219 = cbrt(r541208);
double r541220 = r541208 + r541215;
double r541221 = cbrt(r541220);
double r541222 = r541219 / r541221;
double r541223 = log(r541222);
double r541224 = 2.0;
double r541225 = r541223 * r541224;
double r541226 = r541225 * r541208;
double r541227 = exp(r541226);
double r541228 = cbrt(r541219);
double r541229 = r541228 * r541228;
double r541230 = r541229 * r541228;
double r541231 = r541219 * r541230;
double r541232 = r541227 / r541231;
double r541233 = pow(r541222, r541208);
double r541234 = r541233 / r541219;
double r541235 = r541232 * r541234;
double r541236 = r541214 ? r541218 : r541235;
return r541236;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.2 |
| Herbie | 0.9 |
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-exp-log33.8
Applied add-exp-log33.8
Applied prod-exp33.8
Applied add-exp-log33.8
Applied add-exp-log33.8
Applied prod-exp33.8
Applied div-exp33.8
Applied pow-exp32.4
Simplified1.5
rmApplied add-cube-cbrt1.9
Final simplification0.9
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))