{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;n \le -62.577189808211486:\\
\;\;\;\;(\left(\frac{\log x}{n}\right) \cdot \left(\frac{\frac{1}{n}}{x}\right) + \left((\left(\frac{\frac{\frac{1}{n}}{x}}{x}\right) \cdot \frac{-1}{2} + \left(\frac{\frac{1}{n}}{x}\right))_*\right))_*\\
\mathbf{elif}\;n \le -5.6166853937121 \cdot 10^{-310}:\\
\;\;\;\;{e}^{\left(\log \left({\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\right)\right)}\\
\mathbf{elif}\;n \le 5977604505.843376:\\
\;\;\;\;{e}^{\left(\log \left(e^{\frac{\log_* (1 + x)}{n}} - {x}^{\left(\frac{1}{n}\right)}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;(\left(\frac{\log x}{n}\right) \cdot \left(\frac{\frac{1}{n}}{x}\right) + \left((\left(\frac{\frac{\frac{1}{n}}{x}}{x}\right) \cdot \frac{-1}{2} + \left(\frac{\frac{1}{n}}{x}\right))_*\right))_*\\
\end{array}double f(double x, double n) {
double r13630186 = x;
double r13630187 = 1.0;
double r13630188 = r13630186 + r13630187;
double r13630189 = n;
double r13630190 = r13630187 / r13630189;
double r13630191 = pow(r13630188, r13630190);
double r13630192 = pow(r13630186, r13630190);
double r13630193 = r13630191 - r13630192;
return r13630193;
}
double f(double x, double n) {
double r13630194 = n;
double r13630195 = -62.577189808211486;
bool r13630196 = r13630194 <= r13630195;
double r13630197 = x;
double r13630198 = log(r13630197);
double r13630199 = r13630198 / r13630194;
double r13630200 = 1.0;
double r13630201 = r13630200 / r13630194;
double r13630202 = r13630201 / r13630197;
double r13630203 = r13630202 / r13630197;
double r13630204 = -0.5;
double r13630205 = fma(r13630203, r13630204, r13630202);
double r13630206 = fma(r13630199, r13630202, r13630205);
double r13630207 = -5.6166853937121e-310;
bool r13630208 = r13630194 <= r13630207;
double r13630209 = exp(1.0);
double r13630210 = r13630197 + r13630200;
double r13630211 = pow(r13630210, r13630201);
double r13630212 = pow(r13630197, r13630201);
double r13630213 = r13630211 - r13630212;
double r13630214 = log(r13630213);
double r13630215 = pow(r13630209, r13630214);
double r13630216 = 5977604505.843376;
bool r13630217 = r13630194 <= r13630216;
double r13630218 = log1p(r13630197);
double r13630219 = r13630218 / r13630194;
double r13630220 = exp(r13630219);
double r13630221 = r13630220 - r13630212;
double r13630222 = log(r13630221);
double r13630223 = pow(r13630209, r13630222);
double r13630224 = r13630217 ? r13630223 : r13630206;
double r13630225 = r13630208 ? r13630215 : r13630224;
double r13630226 = r13630196 ? r13630206 : r13630225;
return r13630226;
}



Bits error versus x



Bits error versus n
if n < -62.577189808211486 or 5977604505.843376 < n Initial program 45.1
rmApplied add-exp-log45.7
rmApplied *-un-lft-identity45.7
Applied exp-prod45.7
Simplified45.7
Taylor expanded around inf 48.5
Simplified32.5
if -62.577189808211486 < n < -5.6166853937121e-310Initial program 0.2
rmApplied add-exp-log0.4
rmApplied *-un-lft-identity0.4
Applied exp-prod0.4
Simplified0.4
if -5.6166853937121e-310 < n < 5977604505.843376Initial program 25.7
rmApplied add-exp-log25.7
rmApplied *-un-lft-identity25.7
Applied exp-prod25.7
Simplified25.7
rmApplied add-exp-log25.7
Applied pow-exp25.7
Simplified2.2
Final simplification19.3
herbie shell --seed 2019112 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))