\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -2.122144077215159 \cdot 10^{+68}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 12.791495951037414:\\
\;\;\;\;e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)} \cdot \frac{e^{\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r21982443 = x;
double r21982444 = y;
double r21982445 = r21982443 + r21982444;
double r21982446 = r21982443 / r21982445;
double r21982447 = log(r21982446);
double r21982448 = r21982443 * r21982447;
double r21982449 = exp(r21982448);
double r21982450 = r21982449 / r21982443;
return r21982450;
}
double f(double x, double y) {
double r21982451 = x;
double r21982452 = -2.122144077215159e+68;
bool r21982453 = r21982451 <= r21982452;
double r21982454 = y;
double r21982455 = -r21982454;
double r21982456 = exp(r21982455);
double r21982457 = r21982456 / r21982451;
double r21982458 = 12.791495951037414;
bool r21982459 = r21982451 <= r21982458;
double r21982460 = cbrt(r21982451);
double r21982461 = r21982454 + r21982451;
double r21982462 = cbrt(r21982461);
double r21982463 = r21982460 / r21982462;
double r21982464 = log(r21982463);
double r21982465 = r21982464 + r21982464;
double r21982466 = r21982451 * r21982465;
double r21982467 = exp(r21982466);
double r21982468 = r21982464 * r21982451;
double r21982469 = exp(r21982468);
double r21982470 = r21982469 / r21982451;
double r21982471 = r21982467 * r21982470;
double r21982472 = r21982459 ? r21982471 : r21982457;
double r21982473 = r21982453 ? r21982457 : r21982472;
return r21982473;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
if x < -2.122144077215159e+68 or 12.791495951037414 < x Initial program 11.3
Taylor expanded around inf 0.0
Simplified0.0
if -2.122144077215159e+68 < x < 12.791495951037414Initial program 10.4
rmApplied *-un-lft-identity10.4
Applied add-cube-cbrt14.0
Applied add-cube-cbrt10.4
Applied times-frac10.4
Applied log-prod2.5
Applied distribute-rgt-in2.5
Applied exp-sum2.5
Applied times-frac2.5
rmApplied times-frac2.5
Applied log-prod0.4
Final simplification0.2
herbie shell --seed 2019158
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))