{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -71967423679655.73:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{\frac{-1}{2}}{x}\right), \left(\frac{1}{x \cdot n}\right), \left(\frac{1}{x \cdot n} - \left(-\frac{\log x}{\left(x \cdot n\right) \cdot n}\right)\right)\right)\\
\mathbf{elif}\;n \le -2.4130801716763244 \cdot 10^{-303}:\\
\;\;\;\;\log \left(\sqrt[3]{e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}\right) + \left(\log \left(\sqrt[3]{e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}} \cdot \sqrt[3]{e^{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)}}}\right) - \log \left(\sqrt[3]{e^{{x}^{\left(\frac{1}{n}\right)}}}\right)\right)\\
\mathbf{elif}\;n \le 215979027.38556987:\\
\;\;\;\;\log \left(e^{e^{\frac{\mathsf{log1p}\left(x\right)}{n}} - {x}^{\left(\frac{1}{n}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{\frac{-1}{2}}{x}\right), \left(\frac{1}{x \cdot n}\right), \left(\frac{1}{x \cdot n} - \left(-\frac{\log x}{\left(x \cdot n\right) \cdot n}\right)\right)\right)\\
\end{array}double f(double x, double n) {
double r15627371 = x;
double r15627372 = 1.0;
double r15627373 = r15627371 + r15627372;
double r15627374 = n;
double r15627375 = r15627372 / r15627374;
double r15627376 = pow(r15627373, r15627375);
double r15627377 = pow(r15627371, r15627375);
double r15627378 = r15627376 - r15627377;
return r15627378;
}
double f(double x, double n) {
double r15627379 = n;
double r15627380 = -71967423679655.73;
bool r15627381 = r15627379 <= r15627380;
double r15627382 = -0.5;
double r15627383 = x;
double r15627384 = r15627382 / r15627383;
double r15627385 = 1.0;
double r15627386 = r15627383 * r15627379;
double r15627387 = r15627385 / r15627386;
double r15627388 = log(r15627383);
double r15627389 = r15627386 * r15627379;
double r15627390 = r15627388 / r15627389;
double r15627391 = -r15627390;
double r15627392 = r15627387 - r15627391;
double r15627393 = fma(r15627384, r15627387, r15627392);
double r15627394 = -2.4130801716763244e-303;
bool r15627395 = r15627379 <= r15627394;
double r15627396 = r15627385 + r15627383;
double r15627397 = r15627385 / r15627379;
double r15627398 = pow(r15627396, r15627397);
double r15627399 = pow(r15627383, r15627397);
double r15627400 = r15627398 - r15627399;
double r15627401 = exp(r15627400);
double r15627402 = cbrt(r15627401);
double r15627403 = log(r15627402);
double r15627404 = exp(r15627398);
double r15627405 = cbrt(r15627404);
double r15627406 = r15627402 * r15627405;
double r15627407 = log(r15627406);
double r15627408 = exp(r15627399);
double r15627409 = cbrt(r15627408);
double r15627410 = log(r15627409);
double r15627411 = r15627407 - r15627410;
double r15627412 = r15627403 + r15627411;
double r15627413 = 215979027.38556987;
bool r15627414 = r15627379 <= r15627413;
double r15627415 = log1p(r15627383);
double r15627416 = r15627415 / r15627379;
double r15627417 = exp(r15627416);
double r15627418 = r15627417 - r15627399;
double r15627419 = exp(r15627418);
double r15627420 = log(r15627419);
double r15627421 = r15627414 ? r15627420 : r15627393;
double r15627422 = r15627395 ? r15627412 : r15627421;
double r15627423 = r15627381 ? r15627393 : r15627422;
return r15627423;
}



Bits error versus x



Bits error versus n
if n < -71967423679655.73 or 215979027.38556987 < n Initial program 45.0
rmApplied add-log-exp45.0
Taylor expanded around inf 32.0
Simplified32.0
if -71967423679655.73 < n < -2.4130801716763244e-303Initial program 1.9
rmApplied add-log-exp2.0
rmApplied add-cube-cbrt2.1
Applied log-prod2.1
rmApplied exp-diff2.1
Applied cbrt-div2.1
Applied associate-*l/2.1
Applied log-div2.1
if -2.4130801716763244e-303 < n < 215979027.38556987Initial program 24.0
rmApplied add-log-exp24.1
rmApplied add-exp-log25.3
Applied pow-exp25.3
Simplified3.2
Final simplification19.2
herbie shell --seed 2019120 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))