{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \le -0.02908645454618034170701790230850747320801 \lor \neg \left(\frac{1}{n} \le 1.311945574490123498954663406335030537412 \cdot 10^{-26}\right):\\
\;\;\;\;\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \mathsf{expm1}\left(\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)\right)} \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \mathsf{expm1}\left(\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)\right)}\right) \cdot \sqrt[3]{\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \mathsf{expm1}\left(\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)\right)} \cdot \sqrt[3]{\left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - e^{\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)}\right) + 1}\right) \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \mathsf{expm1}\left(\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1, \frac{1}{x \cdot n}, -\mathsf{fma}\left(0.5, \frac{1}{{x}^{2} \cdot n}, 1 \cdot \frac{\log \left(\frac{1}{x}\right)}{x \cdot {n}^{2}}\right)\right)\\
\end{array}double f(double x, double n) {
double r74439 = x;
double r74440 = 1.0;
double r74441 = r74439 + r74440;
double r74442 = n;
double r74443 = r74440 / r74442;
double r74444 = pow(r74441, r74443);
double r74445 = pow(r74439, r74443);
double r74446 = r74444 - r74445;
return r74446;
}
double f(double x, double n) {
double r74447 = 1.0;
double r74448 = n;
double r74449 = r74447 / r74448;
double r74450 = -0.02908645454618034;
bool r74451 = r74449 <= r74450;
double r74452 = 1.3119455744901235e-26;
bool r74453 = r74449 <= r74452;
double r74454 = !r74453;
bool r74455 = r74451 || r74454;
double r74456 = x;
double r74457 = r74456 + r74447;
double r74458 = pow(r74457, r74449);
double r74459 = pow(r74456, r74449);
double r74460 = log1p(r74459);
double r74461 = expm1(r74460);
double r74462 = r74458 - r74461;
double r74463 = cbrt(r74462);
double r74464 = r74463 * r74463;
double r74465 = exp(r74460);
double r74466 = r74458 - r74465;
double r74467 = 1.0;
double r74468 = r74466 + r74467;
double r74469 = cbrt(r74468);
double r74470 = r74463 * r74469;
double r74471 = r74470 * r74463;
double r74472 = cbrt(r74471);
double r74473 = r74464 * r74472;
double r74474 = r74456 * r74448;
double r74475 = r74467 / r74474;
double r74476 = 0.5;
double r74477 = 2.0;
double r74478 = pow(r74456, r74477);
double r74479 = r74478 * r74448;
double r74480 = r74467 / r74479;
double r74481 = r74467 / r74456;
double r74482 = log(r74481);
double r74483 = pow(r74448, r74477);
double r74484 = r74456 * r74483;
double r74485 = r74482 / r74484;
double r74486 = r74447 * r74485;
double r74487 = fma(r74476, r74480, r74486);
double r74488 = -r74487;
double r74489 = fma(r74447, r74475, r74488);
double r74490 = r74455 ? r74473 : r74489;
return r74490;
}



Bits error versus x



Bits error versus n
if (/ 1.0 n) < -0.02908645454618034 or 1.3119455744901235e-26 < (/ 1.0 n) Initial program 9.8
rmApplied expm1-log1p-u9.9
rmApplied add-cube-cbrt9.9
rmApplied add-cube-cbrt9.9
rmApplied expm1-udef9.9
Applied associate--r-9.9
if -0.02908645454618034 < (/ 1.0 n) < 1.3119455744901235e-26Initial program 44.7
Taylor expanded around inf 32.2
Simplified32.2
Final simplification22.5
herbie shell --seed 2020001 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))