{\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.032379292376500446:\\
\;\;\;\;{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - \sqrt[3]{e^{\log \left({\left({x}^{\left(\frac{1}{n}\right)}\right)}^{3}\right)}}\\
\mathbf{elif}\;\frac{1}{n} \le 1.50994306778113202 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{1}{n}}{x} - \left(\log \left(e^{\frac{0.5}{{x}^{2} \cdot n}}\right) - \frac{\log x \cdot 1}{x \cdot {n}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(x + 1\right)}^{\left(2 \cdot \frac{1}{n}\right)} - {x}^{\left(2 \cdot \frac{1}{n}\right)}}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + {x}^{\left(\frac{1}{n}\right)}}\\
\end{array}double f(double x, double n) {
double r47310 = x;
double r47311 = 1.0;
double r47312 = r47310 + r47311;
double r47313 = n;
double r47314 = r47311 / r47313;
double r47315 = pow(r47312, r47314);
double r47316 = pow(r47310, r47314);
double r47317 = r47315 - r47316;
return r47317;
}
double f(double x, double n) {
double r47318 = 1.0;
double r47319 = n;
double r47320 = r47318 / r47319;
double r47321 = -0.032379292376500446;
bool r47322 = r47320 <= r47321;
double r47323 = x;
double r47324 = r47323 + r47318;
double r47325 = pow(r47324, r47320);
double r47326 = pow(r47323, r47320);
double r47327 = 3.0;
double r47328 = pow(r47326, r47327);
double r47329 = log(r47328);
double r47330 = exp(r47329);
double r47331 = cbrt(r47330);
double r47332 = r47325 - r47331;
double r47333 = 1.509943067781132e-13;
bool r47334 = r47320 <= r47333;
double r47335 = r47320 / r47323;
double r47336 = 0.5;
double r47337 = 2.0;
double r47338 = pow(r47323, r47337);
double r47339 = r47338 * r47319;
double r47340 = r47336 / r47339;
double r47341 = exp(r47340);
double r47342 = log(r47341);
double r47343 = log(r47323);
double r47344 = r47343 * r47318;
double r47345 = pow(r47319, r47337);
double r47346 = r47323 * r47345;
double r47347 = r47344 / r47346;
double r47348 = r47342 - r47347;
double r47349 = r47335 - r47348;
double r47350 = r47337 * r47320;
double r47351 = pow(r47324, r47350);
double r47352 = pow(r47323, r47350);
double r47353 = r47351 - r47352;
double r47354 = r47325 + r47326;
double r47355 = r47353 / r47354;
double r47356 = r47334 ? r47349 : r47355;
double r47357 = r47322 ? r47332 : r47356;
return r47357;
}



Bits error versus x



Bits error versus n
Results
if (/ 1.0 n) < -0.032379292376500446Initial program 0.2
rmApplied add-cbrt-cube0.3
Simplified0.3
rmApplied add-exp-log0.3
Applied pow-exp0.3
Applied pow-exp0.3
Simplified0.3
if -0.032379292376500446 < (/ 1.0 n) < 1.509943067781132e-13Initial program 44.5
Taylor expanded around inf 32.8
Simplified32.3
rmApplied add-log-exp32.4
Simplified32.4
if 1.509943067781132e-13 < (/ 1.0 n) Initial program 7.6
rmApplied add-cbrt-cube7.7
Simplified7.7
rmApplied add-exp-log7.7
Applied pow-exp7.7
Applied pow-exp7.7
Simplified7.7
rmApplied flip--7.8
Simplified7.6
Simplified7.6
Final simplification24.0
herbie shell --seed 2020060
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))