{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -3134953497269160640512:\\
\;\;\;\;\left(\sqrt{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)}} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \left(\frac{0.5}{x \cdot n} - 0.25 \cdot \left(\frac{1}{{x}^{2} \cdot n} + \frac{-\log x}{e^{e^{\log \left(\log \left(x \cdot {n}^{2}\right)\right)}}}\right)\right)\\
\mathbf{elif}\;n \le 11998314702.362140655517578125:\\
\;\;\;\;\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(\frac{0.5}{x \cdot n} - 0.25 \cdot \left(\frac{1}{\log \left(e^{{x}^{2} \cdot n}\right)} + \frac{-\log x}{x \cdot {n}^{2}}\right)\right)\\
\end{array}double f(double x, double n) {
double r57333 = x;
double r57334 = 1.0;
double r57335 = r57333 + r57334;
double r57336 = n;
double r57337 = r57334 / r57336;
double r57338 = pow(r57335, r57337);
double r57339 = pow(r57333, r57337);
double r57340 = r57338 - r57339;
return r57340;
}
double f(double x, double n) {
double r57341 = n;
double r57342 = -3.1349534972691606e+21;
bool r57343 = r57341 <= r57342;
double r57344 = x;
double r57345 = 1.0;
double r57346 = r57344 + r57345;
double r57347 = r57345 / r57341;
double r57348 = pow(r57346, r57347);
double r57349 = sqrt(r57348);
double r57350 = 2.0;
double r57351 = r57347 / r57350;
double r57352 = pow(r57344, r57351);
double r57353 = r57349 + r57352;
double r57354 = 0.5;
double r57355 = r57344 * r57341;
double r57356 = r57354 / r57355;
double r57357 = 0.25;
double r57358 = 1.0;
double r57359 = pow(r57344, r57350);
double r57360 = r57359 * r57341;
double r57361 = r57358 / r57360;
double r57362 = log(r57344);
double r57363 = -r57362;
double r57364 = pow(r57341, r57350);
double r57365 = r57344 * r57364;
double r57366 = log(r57365);
double r57367 = log(r57366);
double r57368 = exp(r57367);
double r57369 = exp(r57368);
double r57370 = r57363 / r57369;
double r57371 = r57361 + r57370;
double r57372 = r57357 * r57371;
double r57373 = r57356 - r57372;
double r57374 = r57353 * r57373;
double r57375 = 11998314702.36214;
bool r57376 = r57341 <= r57375;
double r57377 = r57349 - r57352;
double r57378 = r57353 * r57377;
double r57379 = exp(r57360);
double r57380 = log(r57379);
double r57381 = r57358 / r57380;
double r57382 = r57363 / r57365;
double r57383 = r57381 + r57382;
double r57384 = r57357 * r57383;
double r57385 = r57356 - r57384;
double r57386 = r57353 * r57385;
double r57387 = r57376 ? r57378 : r57386;
double r57388 = r57343 ? r57374 : r57387;
return r57388;
}



Bits error versus x



Bits error versus n
Results
if n < -3.1349534972691606e+21Initial program 44.0
rmApplied sqr-pow44.0
Applied add-sqr-sqrt44.0
Applied difference-of-squares44.0
Taylor expanded around inf 32.3
Simplified32.3
rmApplied add-exp-log64.0
Applied pow-exp64.0
Applied add-exp-log64.0
Applied prod-exp64.0
Simplified32.3
rmApplied add-exp-log32.3
if -3.1349534972691606e+21 < n < 11998314702.36214Initial program 9.3
rmApplied sqr-pow9.3
Applied add-sqr-sqrt9.3
Applied difference-of-squares9.3
if 11998314702.36214 < n Initial program 45.1
rmApplied sqr-pow45.2
Applied add-sqr-sqrt45.2
Applied difference-of-squares45.2
Taylor expanded around inf 32.8
Simplified32.8
rmApplied add-log-exp32.9
Final simplification22.2
herbie shell --seed 2019305
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))