{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -35447295026.760864 \lor \neg \left(n \le 604142.656624356867\right):\\
\;\;\;\;\frac{\frac{1 - \left(\frac{\frac{0.5}{n}}{x} \cdot n - x \cdot \frac{\log x \cdot 1}{x \cdot n}\right)}{x}}{n}\\
\mathbf{else}:\\
\;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\\
\end{array}double code(double x, double n) {
return (pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n)));
}
double code(double x, double n) {
double VAR;
if (((n <= -35447295026.760864) || !(n <= 604142.6566243569))) {
VAR = (((1.0 - ((((0.5 / n) / x) * n) - (x * ((log(x) * 1.0) / (x * n))))) / x) / n);
} else {
VAR = (pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n)));
}
return VAR;
}



Bits error versus x



Bits error versus n
Results
if n < -35447295026.760864 or 604142.6566243569 < n Initial program 44.9
Taylor expanded around inf 32.8
Simplified32.3
rmApplied unpow232.3
Applied associate-*r*32.3
Applied associate-/r*32.3
Applied unpow232.3
Applied associate-/r*32.1
Applied frac-sub32.1
Applied associate-/l/32.7
Applied sub-div32.7
rmApplied associate-/r*32.3
if -35447295026.760864 < n < 604142.6566243569Initial program 3.3
Final simplification24.0
herbie shell --seed 2020071
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))