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



Bits error versus x



Bits error versus n
Results
if (/ 1.0 n) < -192.91395020987812 or 1.4546846550253057e-14 < (/ 1.0 n) Initial program 3.5
rmApplied add-cube-cbrt3.5
Applied unpow-prod-down3.5
Applied fma-neg3.5
if -192.91395020987812 < (/ 1.0 n) < 1.4546846550253057e-14Initial program 45.2
Taylor expanded around inf 33.3
Simplified33.3
Final simplification24.6
herbie shell --seed 2020079 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))