\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 0.80535578456303214:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{elif}\;y \le 9.9908906795322668 \cdot 10^{98}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{x + y}{\sqrt[3]{x}}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r342704 = x;
double r342705 = y;
double r342706 = r342704 + r342705;
double r342707 = r342704 / r342706;
double r342708 = log(r342707);
double r342709 = r342704 * r342708;
double r342710 = exp(r342709);
double r342711 = r342710 / r342704;
return r342711;
}
double f(double x, double y) {
double r342712 = y;
double r342713 = 0.8053557845630321;
bool r342714 = r342712 <= r342713;
double r342715 = x;
double r342716 = 2.0;
double r342717 = cbrt(r342715);
double r342718 = r342715 + r342712;
double r342719 = cbrt(r342718);
double r342720 = r342717 / r342719;
double r342721 = log(r342720);
double r342722 = r342716 * r342721;
double r342723 = r342715 * r342722;
double r342724 = r342715 * r342721;
double r342725 = r342723 + r342724;
double r342726 = exp(r342725);
double r342727 = r342726 / r342715;
double r342728 = 9.990890679532267e+98;
bool r342729 = r342712 <= r342728;
double r342730 = r342717 * r342717;
double r342731 = r342718 / r342717;
double r342732 = r342730 / r342731;
double r342733 = log(r342732);
double r342734 = r342715 * r342733;
double r342735 = exp(r342734);
double r342736 = r342735 / r342715;
double r342737 = r342719 * r342719;
double r342738 = cbrt(r342737);
double r342739 = cbrt(r342719);
double r342740 = r342738 * r342739;
double r342741 = r342717 / r342740;
double r342742 = log(r342741);
double r342743 = r342715 * r342742;
double r342744 = r342723 + r342743;
double r342745 = exp(r342744);
double r342746 = r342745 / r342715;
double r342747 = r342729 ? r342736 : r342746;
double r342748 = r342714 ? r342727 : r342747;
return r342748;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 7.7 |
| Herbie | 4.1 |
if y < 0.8053557845630321Initial program 4.4
rmApplied add-cube-cbrt27.9
Applied add-cube-cbrt4.4
Applied times-frac4.4
Applied log-prod1.6
Applied distribute-lft-in1.6
Simplified0.7
if 0.8053557845630321 < y < 9.990890679532267e+98Initial program 35.7
rmApplied add-cube-cbrt21.4
Applied associate-/l*21.3
if 9.990890679532267e+98 < y Initial program 29.7
rmApplied add-cube-cbrt23.9
Applied add-cube-cbrt29.8
Applied times-frac29.8
Applied log-prod18.5
Applied distribute-lft-in18.5
Simplified14.5
rmApplied add-cube-cbrt12.6
Applied cbrt-prod11.1
Final simplification4.1
herbie shell --seed 2020033 +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))