{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \le -1.2903828288017193 \cdot 10^{-09}:\\
\;\;\;\;\sqrt[3]{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)} \cdot \log \left(e^{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{\left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} + \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right) \cdot \left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} - \sqrt{{x}^{\left(\frac{1}{n}\right)}}\right)}}\right)\\
\mathbf{elif}\;\frac{1}{n} \le 4.526766227008586 \cdot 10^{-33}:\\
\;\;\;\;\left(\frac{\frac{-1}{2}}{x \cdot \left(x \cdot n\right)} + \frac{\frac{\log x}{n}}{x \cdot n}\right) + \frac{\frac{1}{x}}{n}\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right) \cdot \sqrt[3]{e^{\log \left(\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)\right)}}\\
\end{array}double f(double x, double n) {
double r1765730 = x;
double r1765731 = 1.0;
double r1765732 = r1765730 + r1765731;
double r1765733 = n;
double r1765734 = r1765731 / r1765733;
double r1765735 = pow(r1765732, r1765734);
double r1765736 = pow(r1765730, r1765734);
double r1765737 = r1765735 - r1765736;
return r1765737;
}
double f(double x, double n) {
double r1765738 = 1.0;
double r1765739 = n;
double r1765740 = r1765738 / r1765739;
double r1765741 = -1.2903828288017193e-09;
bool r1765742 = r1765740 <= r1765741;
double r1765743 = x;
double r1765744 = r1765743 + r1765738;
double r1765745 = pow(r1765744, r1765740);
double r1765746 = pow(r1765743, r1765740);
double r1765747 = r1765745 - r1765746;
double r1765748 = exp(r1765747);
double r1765749 = log(r1765748);
double r1765750 = cbrt(r1765749);
double r1765751 = cbrt(r1765747);
double r1765752 = sqrt(r1765745);
double r1765753 = sqrt(r1765746);
double r1765754 = r1765752 + r1765753;
double r1765755 = r1765752 - r1765753;
double r1765756 = r1765754 * r1765755;
double r1765757 = cbrt(r1765756);
double r1765758 = r1765751 * r1765757;
double r1765759 = exp(r1765758);
double r1765760 = log(r1765759);
double r1765761 = r1765750 * r1765760;
double r1765762 = 4.526766227008586e-33;
bool r1765763 = r1765740 <= r1765762;
double r1765764 = -0.5;
double r1765765 = r1765743 * r1765739;
double r1765766 = r1765743 * r1765765;
double r1765767 = r1765764 / r1765766;
double r1765768 = log(r1765743);
double r1765769 = r1765768 / r1765739;
double r1765770 = r1765769 / r1765765;
double r1765771 = r1765767 + r1765770;
double r1765772 = r1765738 / r1765743;
double r1765773 = r1765772 / r1765739;
double r1765774 = r1765771 + r1765773;
double r1765775 = r1765751 * r1765751;
double r1765776 = exp(r1765775);
double r1765777 = log(r1765776);
double r1765778 = log(r1765749);
double r1765779 = exp(r1765778);
double r1765780 = cbrt(r1765779);
double r1765781 = r1765777 * r1765780;
double r1765782 = r1765763 ? r1765774 : r1765781;
double r1765783 = r1765742 ? r1765761 : r1765782;
return r1765783;
}



Bits error versus x



Bits error versus n
Results
if (/ 1 n) < -1.2903828288017193e-09Initial program 0.9
rmApplied add-log-exp1.1
Applied add-log-exp1.0
Applied diff-log1.0
Simplified1.0
rmApplied add-cube-cbrt1.0
Applied exp-prod1.0
Applied log-pow1.0
rmApplied add-log-exp1.0
rmApplied add-sqr-sqrt1.0
Applied add-sqr-sqrt1.0
Applied difference-of-squares1.0
if -1.2903828288017193e-09 < (/ 1 n) < 4.526766227008586e-33Initial program 44.9
rmApplied add-log-exp44.9
Applied add-log-exp44.9
Applied diff-log44.9
Simplified44.9
Taylor expanded around inf 33.4
Simplified32.8
if 4.526766227008586e-33 < (/ 1 n) Initial program 29.1
rmApplied add-log-exp29.2
Applied add-log-exp29.3
Applied diff-log29.3
Simplified29.2
rmApplied add-cube-cbrt29.2
Applied exp-prod29.2
Applied log-pow29.2
rmApplied add-log-exp29.2
rmApplied add-exp-log29.2
Final simplification23.1
herbie shell --seed 2019146
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))