\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -1.01075574228297838 \cdot 10^{57} \lor \neg \left(x \le 7.8352809339434462\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(x \cdot 2\right) \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\
\end{array}double f(double x, double y) {
double r411675 = x;
double r411676 = y;
double r411677 = r411675 + r411676;
double r411678 = r411675 / r411677;
double r411679 = log(r411678);
double r411680 = r411675 * r411679;
double r411681 = exp(r411680);
double r411682 = r411681 / r411675;
return r411682;
}
double f(double x, double y) {
double r411683 = x;
double r411684 = -1.0107557422829784e+57;
bool r411685 = r411683 <= r411684;
double r411686 = 7.835280933943446;
bool r411687 = r411683 <= r411686;
double r411688 = !r411687;
bool r411689 = r411685 || r411688;
double r411690 = -1.0;
double r411691 = y;
double r411692 = r411690 * r411691;
double r411693 = exp(r411692);
double r411694 = r411693 / r411683;
double r411695 = 2.0;
double r411696 = r411683 * r411695;
double r411697 = cbrt(r411683);
double r411698 = r411683 + r411691;
double r411699 = cbrt(r411698);
double r411700 = r411697 / r411699;
double r411701 = log(r411700);
double r411702 = r411696 * r411701;
double r411703 = exp(r411702);
double r411704 = pow(r411700, r411683);
double r411705 = r411683 / r411704;
double r411706 = r411703 / r411705;
double r411707 = r411689 ? r411694 : r411706;
return r411707;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.8 |
| Herbie | 0.1 |
if x < -1.0107557422829784e+57 or 7.835280933943446 < x Initial program 11.0
Simplified11.0
Taylor expanded around inf 0.0
Simplified0.0
if -1.0107557422829784e+57 < x < 7.835280933943446Initial program 10.8
Simplified10.8
rmApplied add-cube-cbrt13.5
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.3
Applied associate-/l*2.3
rmApplied add-exp-log35.7
Applied add-exp-log35.7
Applied prod-exp35.7
Applied add-exp-log35.7
Applied add-exp-log35.7
Applied prod-exp35.7
Applied div-exp35.7
Applied pow-exp34.7
Simplified0.2
Final simplification0.1
herbie shell --seed 2020035 +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))