{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -47651231.911831676959991455078125:\\
\;\;\;\;\frac{\frac{1}{x}}{n} - \mathsf{fma}\left(\frac{1}{x}, -\frac{\log x}{n \cdot n}, \frac{0.5}{\left(x \cdot x\right) \cdot n}\right)\\
\mathbf{elif}\;n \le 1096.357908857971551697119139134883880615:\\
\;\;\;\;\left(\sqrt[3]{\log \left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)} \cdot \sqrt[3]{\log \left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\right) \cdot \sqrt[3]{\log \left(e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{x}}{n} - \mathsf{fma}\left(\frac{1}{x}, -\frac{\log x}{n \cdot n}, \frac{0.5}{\left(x \cdot x\right) \cdot n}\right)\\
\end{array}double f(double x, double n) {
double r2524859 = x;
double r2524860 = 1.0;
double r2524861 = r2524859 + r2524860;
double r2524862 = n;
double r2524863 = r2524860 / r2524862;
double r2524864 = pow(r2524861, r2524863);
double r2524865 = pow(r2524859, r2524863);
double r2524866 = r2524864 - r2524865;
return r2524866;
}
double f(double x, double n) {
double r2524867 = n;
double r2524868 = -47651231.91183168;
bool r2524869 = r2524867 <= r2524868;
double r2524870 = 1.0;
double r2524871 = x;
double r2524872 = r2524870 / r2524871;
double r2524873 = r2524872 / r2524867;
double r2524874 = log(r2524871);
double r2524875 = r2524867 * r2524867;
double r2524876 = r2524874 / r2524875;
double r2524877 = -r2524876;
double r2524878 = 0.5;
double r2524879 = r2524871 * r2524871;
double r2524880 = r2524879 * r2524867;
double r2524881 = r2524878 / r2524880;
double r2524882 = fma(r2524872, r2524877, r2524881);
double r2524883 = r2524873 - r2524882;
double r2524884 = 1096.3579088579716;
bool r2524885 = r2524867 <= r2524884;
double r2524886 = r2524870 + r2524871;
double r2524887 = r2524870 / r2524867;
double r2524888 = pow(r2524886, r2524887);
double r2524889 = pow(r2524871, r2524887);
double r2524890 = r2524888 - r2524889;
double r2524891 = exp(r2524890);
double r2524892 = log(r2524891);
double r2524893 = cbrt(r2524892);
double r2524894 = r2524893 * r2524893;
double r2524895 = r2524894 * r2524893;
double r2524896 = r2524885 ? r2524895 : r2524883;
double r2524897 = r2524869 ? r2524883 : r2524896;
return r2524897;
}



Bits error versus x



Bits error versus n
if n < -47651231.91183168 or 1096.3579088579716 < n Initial program 44.7
rmApplied add-log-exp44.7
Applied add-log-exp44.7
Applied diff-log44.7
Simplified44.7
Taylor expanded around inf 32.2
Simplified31.5
if -47651231.91183168 < n < 1096.3579088579716Initial program 8.6
rmApplied add-log-exp8.8
Applied add-log-exp8.7
Applied diff-log8.7
Simplified8.7
rmApplied add-cube-cbrt8.7
Final simplification22.0
herbie shell --seed 2019192 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))