{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -669.2773459285388:\\
\;\;\;\;\left(\frac{\frac{1}{n}}{x} - \left(-\frac{\frac{1}{n}}{x} \cdot \frac{\log x}{n}\right)\right) - \frac{\frac{1}{2}}{\log \left(e^{\left(x \cdot x\right) \cdot n}\right)}\\
\mathbf{elif}\;n \le 4227328813.442648:\\
\;\;\;\;{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {\left(x \cdot x\right)}^{\left(\frac{\frac{1}{n}}{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{1}{n}}{x} - \left(-\frac{\frac{1}{n}}{x} \cdot \frac{\log x}{n}\right)\right) - \frac{\frac{1}{2}}{\log \left(e^{\left(x \cdot x\right) \cdot n}\right)}\\
\end{array}double f(double x, double n) {
double r2230508 = x;
double r2230509 = 1.0;
double r2230510 = r2230508 + r2230509;
double r2230511 = n;
double r2230512 = r2230509 / r2230511;
double r2230513 = pow(r2230510, r2230512);
double r2230514 = pow(r2230508, r2230512);
double r2230515 = r2230513 - r2230514;
return r2230515;
}
double f(double x, double n) {
double r2230516 = n;
double r2230517 = -669.2773459285388;
bool r2230518 = r2230516 <= r2230517;
double r2230519 = 1.0;
double r2230520 = r2230519 / r2230516;
double r2230521 = x;
double r2230522 = r2230520 / r2230521;
double r2230523 = log(r2230521);
double r2230524 = r2230523 / r2230516;
double r2230525 = r2230522 * r2230524;
double r2230526 = -r2230525;
double r2230527 = r2230522 - r2230526;
double r2230528 = 0.5;
double r2230529 = r2230521 * r2230521;
double r2230530 = r2230529 * r2230516;
double r2230531 = exp(r2230530);
double r2230532 = log(r2230531);
double r2230533 = r2230528 / r2230532;
double r2230534 = r2230527 - r2230533;
double r2230535 = 4227328813.442648;
bool r2230536 = r2230516 <= r2230535;
double r2230537 = r2230519 + r2230521;
double r2230538 = pow(r2230537, r2230520);
double r2230539 = 2.0;
double r2230540 = r2230520 / r2230539;
double r2230541 = pow(r2230529, r2230540);
double r2230542 = r2230538 - r2230541;
double r2230543 = r2230536 ? r2230542 : r2230534;
double r2230544 = r2230518 ? r2230534 : r2230543;
return r2230544;
}



Bits error versus x



Bits error versus n
Results
if n < -669.2773459285388 or 4227328813.442648 < n Initial program 44.5
rmApplied add-sqr-sqrt44.5
Taylor expanded around inf 32.4
Simplified31.8
rmApplied add-log-exp31.6
if -669.2773459285388 < n < 4227328813.442648Initial program 7.9
rmApplied add-sqr-sqrt8.0
rmApplied sqrt-pow17.9
Applied sqrt-pow18.0
Applied pow-prod-down8.2
Final simplification21.7
herbie shell --seed 2019142
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))