{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \leq -5.1540558658575505 \cdot 10^{-39}:\\
\;\;\;\;\left(\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{\left(\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \left(\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)}}\right) \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}^{\left(\frac{1}{n}\right)} \cdot {\left(\sqrt[3]{x}\right)}^{\left(\frac{1}{n}\right)}}\\
\mathbf{elif}\;\frac{1}{n} \leq 1.7832423444055043 \cdot 10^{-11}:\\
\;\;\;\;\left(\frac{1}{n \cdot x} - \frac{0.5}{x \cdot \left(n \cdot x\right)}\right) + \frac{\log x}{x \cdot \left(n \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(1 + x\right)}^{\left(\frac{2}{n}\right)} - {x}^{\left(\frac{2}{n}\right)}}{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} + {x}^{\left(\frac{1}{n}\right)}}\\
\end{array}(FPCore (x n) :precision binary64 (- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))
(FPCore (x n)
:precision binary64
(if (<= (/ 1.0 n) -5.1540558658575505e-39)
(*
(*
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n))))
(cbrt
(*
(*
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n))))
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n)))))
(cbrt
(*
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n))))
(*
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n))))
(cbrt (- (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n))))))))))
(cbrt
(-
(pow (+ 1.0 x) (/ 1.0 n))
(* (pow (* (cbrt x) (cbrt x)) (/ 1.0 n)) (pow (cbrt x) (/ 1.0 n))))))
(if (<= (/ 1.0 n) 1.7832423444055043e-11)
(+ (- (/ 1.0 (* n x)) (/ 0.5 (* x (* n x)))) (/ (log x) (* x (* n n))))
(/
(- (pow (+ 1.0 x) (/ 2.0 n)) (pow x (/ 2.0 n)))
(+ (pow (+ 1.0 x) (/ 1.0 n)) (pow x (/ 1.0 n)))))))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 tmp;
if ((1.0 / n) <= -5.1540558658575505e-39) {
tmp = (cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n))) * cbrt((cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n))) * cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n)))) * cbrt(cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n))) * (cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n))) * cbrt(pow((1.0 + x), (1.0 / n)) - pow(x, (1.0 / n))))))) * cbrt(pow((1.0 + x), (1.0 / n)) - (pow((cbrt(x) * cbrt(x)), (1.0 / n)) * pow(cbrt(x), (1.0 / n))));
} else if ((1.0 / n) <= 1.7832423444055043e-11) {
tmp = ((1.0 / (n * x)) - (0.5 / (x * (n * x)))) + (log(x) / (x * (n * n)));
} else {
tmp = (pow((1.0 + x), (2.0 / n)) - pow(x, (2.0 / n))) / (pow((1.0 + x), (1.0 / n)) + pow(x, (1.0 / n)));
}
return tmp;
}



Bits error versus x



Bits error versus n
Results
if (/.f64 1 n) < -5.1540558658575505e-39Initial program 9.9
rmApplied add-cube-cbrt_binary64_4589.9
rmApplied add-cube-cbrt_binary64_4589.9
Applied unpow-prod-down_binary64_5029.9
Applied cancel-sign-sub-inv_binary64_3899.9
rmApplied add-cube-cbrt_binary64_4589.9
rmApplied add-cube-cbrt_binary64_4589.9
if -5.1540558658575505e-39 < (/.f64 1 n) < 1.78324234440550429e-11Initial program 45.1
Taylor expanded around inf 32.4
Simplified32.3
if 1.78324234440550429e-11 < (/.f64 1 n) Initial program 7.5
rmApplied flip--_binary64_3987.5
Simplified7.4
Final simplification24.7
herbie shell --seed 2020292
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))