{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -5.126018534815868 \cdot 10^{+17}:\\
\;\;\;\;(\left(\frac{\frac{-1}{2}}{x}\right) \cdot \left(\frac{1}{x \cdot n}\right) + \left(\frac{1}{x \cdot n} - \frac{-\log x}{\left(x \cdot n\right) \cdot n}\right))_*\\
\mathbf{elif}\;n \le -2.0474870811742806 \cdot 10^{-307}:\\
\;\;\;\;\left(\log \left(\sqrt[3]{e^{\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}} \cdot \sqrt[3]{e^{\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}}\right) + \log \left(\sqrt[3]{e^{\sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}}}\right)\right) \cdot \sqrt[3]{{\left(1 + x\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\\
\mathbf{elif}\;n \le 30894828.10545922:\\
\;\;\;\;e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)}\\
\mathbf{else}:\\
\;\;\;\;(\left(\frac{\frac{-1}{2}}{x}\right) \cdot \left(\frac{1}{x \cdot n}\right) + \left(\frac{1}{x \cdot n} - \frac{-\log x}{\left(x \cdot n\right) \cdot n}\right))_*\\
\end{array}double f(double x, double n) {
double r29096983 = x;
double r29096984 = 1.0;
double r29096985 = r29096983 + r29096984;
double r29096986 = n;
double r29096987 = r29096984 / r29096986;
double r29096988 = pow(r29096985, r29096987);
double r29096989 = pow(r29096983, r29096987);
double r29096990 = r29096988 - r29096989;
return r29096990;
}
double f(double x, double n) {
double r29096991 = n;
double r29096992 = -5.126018534815868e+17;
bool r29096993 = r29096991 <= r29096992;
double r29096994 = -0.5;
double r29096995 = x;
double r29096996 = r29096994 / r29096995;
double r29096997 = 1.0;
double r29096998 = r29096995 * r29096991;
double r29096999 = r29096997 / r29096998;
double r29097000 = log(r29096995);
double r29097001 = -r29097000;
double r29097002 = r29096998 * r29096991;
double r29097003 = r29097001 / r29097002;
double r29097004 = r29096999 - r29097003;
double r29097005 = fma(r29096996, r29096999, r29097004);
double r29097006 = -2.0474870811742806e-307;
bool r29097007 = r29096991 <= r29097006;
double r29097008 = r29096997 + r29096995;
double r29097009 = r29096997 / r29096991;
double r29097010 = pow(r29097008, r29097009);
double r29097011 = pow(r29096995, r29097009);
double r29097012 = r29097010 - r29097011;
double r29097013 = cbrt(r29097012);
double r29097014 = r29097013 * r29097013;
double r29097015 = exp(r29097014);
double r29097016 = cbrt(r29097015);
double r29097017 = r29097016 * r29097016;
double r29097018 = log(r29097017);
double r29097019 = log(r29097016);
double r29097020 = r29097018 + r29097019;
double r29097021 = r29097020 * r29097013;
double r29097022 = 30894828.10545922;
bool r29097023 = r29096991 <= r29097022;
double r29097024 = log1p(r29096995);
double r29097025 = r29097024 / r29096991;
double r29097026 = exp(r29097025);
double r29097027 = r29097026 - r29097011;
double r29097028 = r29097023 ? r29097027 : r29097005;
double r29097029 = r29097007 ? r29097021 : r29097028;
double r29097030 = r29096993 ? r29097005 : r29097029;
return r29097030;
}



Bits error versus x



Bits error versus n
if n < -5.126018534815868e+17 or 30894828.10545922 < n Initial program 44.7
Taylor expanded around inf 32.6
Simplified32.6
if -5.126018534815868e+17 < n < -2.0474870811742806e-307Initial program 2.1
rmApplied add-log-exp2.2
rmApplied add-cube-cbrt2.2
Applied exp-prod2.2
Applied log-pow2.2
rmApplied add-cube-cbrt2.2
Applied log-prod2.2
if -2.0474870811742806e-307 < n < 30894828.10545922Initial program 23.3
rmApplied add-exp-log23.6
Applied pow-exp23.6
Simplified1.7
Final simplification19.2
herbie shell --seed 2019104 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))