\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.533037271626305145606026058479633661489 \cdot 10^{101} \lor \neg \left(x \le 3.231969950629079146503457545048729169032 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r449791 = x;
double r449792 = y;
double r449793 = r449791 + r449792;
double r449794 = r449791 / r449793;
double r449795 = log(r449794);
double r449796 = r449791 * r449795;
double r449797 = exp(r449796);
double r449798 = r449797 / r449791;
return r449798;
}
double f(double x, double y) {
double r449799 = x;
double r449800 = -1.533037271626305e+101;
bool r449801 = r449799 <= r449800;
double r449802 = 3.231969950629079e-16;
bool r449803 = r449799 <= r449802;
double r449804 = !r449803;
bool r449805 = r449801 || r449804;
double r449806 = -1.0;
double r449807 = y;
double r449808 = r449806 * r449807;
double r449809 = exp(r449808);
double r449810 = r449809 / r449799;
double r449811 = 2.0;
double r449812 = cbrt(r449799);
double r449813 = r449799 + r449807;
double r449814 = cbrt(r449813);
double r449815 = r449812 / r449814;
double r449816 = log(r449815);
double r449817 = r449811 * r449816;
double r449818 = r449817 * r449799;
double r449819 = exp(r449818);
double r449820 = pow(r449815, r449799);
double r449821 = r449819 * r449820;
double r449822 = r449821 / r449799;
double r449823 = r449805 ? r449810 : r449822;
return r449823;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.7 |
| Herbie | 0.6 |
if x < -1.533037271626305e+101 or 3.231969950629079e-16 < x Initial program 10.9
Simplified10.9
Taylor expanded around inf 0.7
Simplified0.7
if -1.533037271626305e+101 < x < 3.231969950629079e-16Initial program 10.9
Simplified10.9
rmApplied add-cube-cbrt15.9
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied unpow-prod-down2.7
rmApplied add-exp-log38.6
Applied add-exp-log38.6
Applied prod-exp38.6
Applied add-exp-log38.6
Applied add-exp-log38.6
Applied prod-exp38.6
Applied div-exp38.6
Applied pow-exp37.4
Simplified0.4
Final simplification0.6
herbie shell --seed 2020001
(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))