\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 227.4569151677616218876210041344165802002 \lor \neg \left(y \le 1.480529159109445059080956924684942271604 \cdot 10^{146}\right):\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{x}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r402822 = x;
double r402823 = y;
double r402824 = r402822 + r402823;
double r402825 = r402822 / r402824;
double r402826 = log(r402825);
double r402827 = r402822 * r402826;
double r402828 = exp(r402827);
double r402829 = r402828 / r402822;
return r402829;
}
double f(double x, double y) {
double r402830 = y;
double r402831 = 227.45691516776162;
bool r402832 = r402830 <= r402831;
double r402833 = 1.480529159109445e+146;
bool r402834 = r402830 <= r402833;
double r402835 = !r402834;
bool r402836 = r402832 || r402835;
double r402837 = x;
double r402838 = 2.0;
double r402839 = cbrt(r402837);
double r402840 = r402837 + r402830;
double r402841 = cbrt(r402840);
double r402842 = r402839 / r402841;
double r402843 = log(r402842);
double r402844 = r402838 * r402843;
double r402845 = r402844 + r402843;
double r402846 = r402837 * r402845;
double r402847 = exp(r402846);
double r402848 = r402847 / r402837;
double r402849 = 1.0;
double r402850 = r402841 * r402841;
double r402851 = r402849 / r402850;
double r402852 = r402837 / r402841;
double r402853 = r402851 * r402852;
double r402854 = log(r402853);
double r402855 = r402837 * r402854;
double r402856 = exp(r402855);
double r402857 = r402856 / r402837;
double r402858 = r402836 ? r402848 : r402857;
return r402858;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.7 |
| Herbie | 4.6 |
if y < 227.45691516776162 or 1.480529159109445e+146 < y Initial program 7.8
rmApplied add-cube-cbrt28.1
Applied add-cube-cbrt7.8
Applied times-frac7.8
Applied log-prod3.5
Simplified2.1
if 227.45691516776162 < y < 1.480529159109445e+146Initial program 34.5
rmApplied add-cube-cbrt23.2
Applied *-un-lft-identity23.2
Applied times-frac23.2
Final simplification4.6
herbie shell --seed 2020001 +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))