{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -7365720.8177897743880748748779296875:\\
\;\;\;\;\left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \left(\left(-0.25 \cdot \left(\frac{1}{\log \left(e^{{x}^{2} \cdot n}\right)} + \frac{\log \left(\frac{1}{x}\right)}{x \cdot {n}^{2}}\right)\right) + \frac{\frac{0.5}{n}}{x}\right)\\
\mathbf{elif}\;n \le 100.3346359568117804883513599634170532227:\\
\;\;\;\;\left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} - {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \left(\left(-0.25 \cdot \left(\frac{1}{{x}^{2} \cdot n} + \frac{\log \left(\frac{1}{x}\right)}{e^{\log \left(x \cdot {n}^{2}\right)}}\right)\right) + \frac{\frac{0.5}{n}}{x}\right)\\
\end{array}double f(double x, double n) {
double r84598 = x;
double r84599 = 1.0;
double r84600 = r84598 + r84599;
double r84601 = n;
double r84602 = r84599 / r84601;
double r84603 = pow(r84600, r84602);
double r84604 = pow(r84598, r84602);
double r84605 = r84603 - r84604;
return r84605;
}
double f(double x, double n) {
double r84606 = n;
double r84607 = -7365720.817789774;
bool r84608 = r84606 <= r84607;
double r84609 = x;
double r84610 = 1.0;
double r84611 = r84609 + r84610;
double r84612 = r84610 / r84606;
double r84613 = pow(r84611, r84612);
double r84614 = sqrt(r84613);
double r84615 = 2.0;
double r84616 = r84612 / r84615;
double r84617 = pow(r84609, r84616);
double r84618 = r84614 + r84617;
double r84619 = 0.25;
double r84620 = 1.0;
double r84621 = pow(r84609, r84615);
double r84622 = r84621 * r84606;
double r84623 = exp(r84622);
double r84624 = log(r84623);
double r84625 = r84620 / r84624;
double r84626 = r84620 / r84609;
double r84627 = log(r84626);
double r84628 = pow(r84606, r84615);
double r84629 = r84609 * r84628;
double r84630 = r84627 / r84629;
double r84631 = r84625 + r84630;
double r84632 = r84619 * r84631;
double r84633 = -r84632;
double r84634 = 0.5;
double r84635 = r84634 / r84606;
double r84636 = r84635 / r84609;
double r84637 = r84633 + r84636;
double r84638 = r84618 * r84637;
double r84639 = 100.33463595681178;
bool r84640 = r84606 <= r84639;
double r84641 = r84614 - r84617;
double r84642 = r84618 * r84641;
double r84643 = r84620 / r84622;
double r84644 = log(r84629);
double r84645 = exp(r84644);
double r84646 = r84627 / r84645;
double r84647 = r84643 + r84646;
double r84648 = r84619 * r84647;
double r84649 = -r84648;
double r84650 = r84649 + r84636;
double r84651 = r84618 * r84650;
double r84652 = r84640 ? r84642 : r84651;
double r84653 = r84608 ? r84638 : r84652;
return r84653;
}



Bits error versus x



Bits error versus n
Results
if n < -7365720.817789774Initial program 44.7
rmApplied sqr-pow44.7
Applied add-sqr-sqrt44.7
Applied difference-of-squares44.7
Taylor expanded around inf 31.8
Simplified31.3
rmApplied add-log-exp31.4
if -7365720.817789774 < n < 100.33463595681178Initial program 7.9
rmApplied sqr-pow8.0
Applied add-sqr-sqrt7.9
Applied difference-of-squares7.9
if 100.33463595681178 < n Initial program 43.9
rmApplied sqr-pow44.0
Applied add-sqr-sqrt43.9
Applied difference-of-squares43.9
Taylor expanded around inf 32.4
Simplified31.9
rmApplied add-exp-log31.9
Applied pow-exp31.9
Applied add-exp-log31.9
Applied prod-exp31.9
Simplified31.9
Final simplification21.5
herbie shell --seed 2019344
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))