\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.04718936956828664 \cdot 10^{55}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 8.4817809066997952 \cdot 10^{-11}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\end{array}double f(double x, double y) {
double r352850 = x;
double r352851 = y;
double r352852 = r352850 + r352851;
double r352853 = r352850 / r352852;
double r352854 = log(r352853);
double r352855 = r352850 * r352854;
double r352856 = exp(r352855);
double r352857 = r352856 / r352850;
return r352857;
}
double f(double x, double y) {
double r352858 = x;
double r352859 = -3.0471893695682866e+55;
bool r352860 = r352858 <= r352859;
double r352861 = 1.0;
double r352862 = y;
double r352863 = exp(r352862);
double r352864 = r352858 * r352863;
double r352865 = r352861 / r352864;
double r352866 = 8.481780906699795e-11;
bool r352867 = r352858 <= r352866;
double r352868 = cbrt(r352858);
double r352869 = r352868 * r352868;
double r352870 = r352858 + r352862;
double r352871 = cbrt(r352870);
double r352872 = r352871 * r352871;
double r352873 = r352869 / r352872;
double r352874 = log(r352873);
double r352875 = r352858 * r352874;
double r352876 = r352868 / r352871;
double r352877 = log(r352876);
double r352878 = r352858 * r352877;
double r352879 = r352875 + r352878;
double r352880 = exp(r352879);
double r352881 = r352880 / r352858;
double r352882 = -1.0;
double r352883 = r352882 * r352862;
double r352884 = exp(r352883);
double r352885 = r352884 / r352858;
double r352886 = r352867 ? r352881 : r352885;
double r352887 = r352860 ? r352865 : r352886;
return r352887;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.4 |
|---|---|
| Target | 7.7 |
| Herbie | 1.4 |
if x < -3.0471893695682866e+55Initial program 14.4
Taylor expanded around inf 0.0
rmApplied clear-num0.0
Simplified0.0
if -3.0471893695682866e+55 < x < 8.481780906699795e-11Initial program 10.9
rmApplied add-cube-cbrt14.1
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied log-prod2.3
Applied distribute-lft-in2.3
if 8.481780906699795e-11 < x Initial program 10.0
Taylor expanded around inf 0.8
Final simplification1.4
herbie shell --seed 2020018 +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))