{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \le -0.0023306069338563098 \lor \neg \left(\frac{1}{n} \le 8.64599365188118559 \cdot 10^{-15}\right):\\
\;\;\;\;\sqrt[3]{{\left(\sqrt[3]{{\left(\sqrt[3]{{\left(\sqrt[3]{{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)}^{3}}\right)}^{3}}\right)}^{3}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{n}}{x} - \left(\frac{\frac{0.5}{n}}{{x}^{2}} - \frac{\log x \cdot 1}{x \cdot {n}^{2}}\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 ((((1.0 / n) <= -0.00233060693385631) || !((1.0 / n) <= 8.645993651881186e-15))) {
VAR = cbrt(pow(cbrt(pow(cbrt(pow(cbrt(pow((pow((x + 1.0), (1.0 / n)) - pow(x, (1.0 / n))), 3.0)), 3.0)), 3.0)), 3.0));
} else {
VAR = (((1.0 / n) / x) - (((0.5 / n) / pow(x, 2.0)) - ((log(x) * 1.0) / (x * pow(n, 2.0)))));
}
return VAR;
}



Bits error versus x



Bits error versus n
Results
if (/ 1.0 n) < -0.00233060693385631 or 8.645993651881186e-15 < (/ 1.0 n) Initial program 3.2
rmApplied add-cbrt-cube3.3
Simplified3.3
rmApplied add-cbrt-cube3.3
Simplified3.3
rmApplied add-cbrt-cube3.3
Simplified3.3
rmApplied add-cbrt-cube3.3
Simplified3.3
if -0.00233060693385631 < (/ 1.0 n) < 8.645993651881186e-15Initial program 45.4
Taylor expanded around inf 33.6
Simplified33.0
Final simplification24.5
herbie shell --seed 2020105
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))