{\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({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - e^{\mathsf{log1p}\left({x}^{\left(\frac{1}{n}\right)}\right)}\right) + 1} \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(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 r72232 = x;
double r72233 = 1.0;
double r72234 = r72232 + r72233;
double r72235 = n;
double r72236 = r72233 / r72235;
double r72237 = pow(r72234, r72236);
double r72238 = pow(r72232, r72236);
double r72239 = r72237 - r72238;
return r72239;
}
double f(double x, double n) {
double r72240 = 1.0;
double r72241 = n;
double r72242 = r72240 / r72241;
double r72243 = -0.02908645454618034;
bool r72244 = r72242 <= r72243;
double r72245 = 1.3119455744901235e-26;
bool r72246 = r72242 <= r72245;
double r72247 = !r72246;
bool r72248 = r72244 || r72247;
double r72249 = x;
double r72250 = r72249 + r72240;
double r72251 = pow(r72250, r72242);
double r72252 = pow(r72249, r72242);
double r72253 = log1p(r72252);
double r72254 = expm1(r72253);
double r72255 = r72251 - r72254;
double r72256 = cbrt(r72255);
double r72257 = r72256 * r72256;
double r72258 = exp(r72253);
double r72259 = r72251 - r72258;
double r72260 = 1.0;
double r72261 = r72259 + r72260;
double r72262 = cbrt(r72261);
double r72263 = r72262 * r72256;
double r72264 = r72263 * r72256;
double r72265 = cbrt(r72264);
double r72266 = r72257 * r72265;
double r72267 = r72249 * r72241;
double r72268 = r72260 / r72267;
double r72269 = 0.5;
double r72270 = 2.0;
double r72271 = pow(r72249, r72270);
double r72272 = r72271 * r72241;
double r72273 = r72260 / r72272;
double r72274 = r72260 / r72249;
double r72275 = log(r72274);
double r72276 = pow(r72241, r72270);
double r72277 = r72249 * r72276;
double r72278 = r72275 / r72277;
double r72279 = r72240 * r72278;
double r72280 = fma(r72269, r72273, r72279);
double r72281 = -r72280;
double r72282 = fma(r72240, r72268, r72281);
double r72283 = r72248 ? r72266 : r72282;
return r72283;
}



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))))