{\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 r72252 = x;
double r72253 = 1.0;
double r72254 = r72252 + r72253;
double r72255 = n;
double r72256 = r72253 / r72255;
double r72257 = pow(r72254, r72256);
double r72258 = pow(r72252, r72256);
double r72259 = r72257 - r72258;
return r72259;
}
double f(double x, double n) {
double r72260 = 1.0;
double r72261 = n;
double r72262 = r72260 / r72261;
double r72263 = -0.02908645454618034;
bool r72264 = r72262 <= r72263;
double r72265 = 1.3119455744901235e-26;
bool r72266 = r72262 <= r72265;
double r72267 = !r72266;
bool r72268 = r72264 || r72267;
double r72269 = x;
double r72270 = r72269 + r72260;
double r72271 = pow(r72270, r72262);
double r72272 = pow(r72269, r72262);
double r72273 = log1p(r72272);
double r72274 = expm1(r72273);
double r72275 = r72271 - r72274;
double r72276 = cbrt(r72275);
double r72277 = r72276 * r72276;
double r72278 = exp(r72273);
double r72279 = r72271 - r72278;
double r72280 = 1.0;
double r72281 = r72279 + r72280;
double r72282 = cbrt(r72281);
double r72283 = r72276 * r72282;
double r72284 = r72283 * r72276;
double r72285 = cbrt(r72284);
double r72286 = r72277 * r72285;
double r72287 = r72269 * r72261;
double r72288 = r72280 / r72287;
double r72289 = 0.5;
double r72290 = 2.0;
double r72291 = pow(r72269, r72290);
double r72292 = r72291 * r72261;
double r72293 = r72280 / r72292;
double r72294 = r72280 / r72269;
double r72295 = log(r72294);
double r72296 = pow(r72261, r72290);
double r72297 = r72269 * r72296;
double r72298 = r72295 / r72297;
double r72299 = r72260 * r72298;
double r72300 = fma(r72289, r72293, r72299);
double r72301 = -r72300;
double r72302 = fma(r72260, r72288, r72301);
double r72303 = r72268 ? r72286 : r72302;
return r72303;
}



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