{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{n} \le -7.380908236352897 \cdot 10^{-15}:\\
\;\;\;\;\left(\sqrt[3]{\log \left(e^{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right)} \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right) \cdot \sqrt[3]{\left({\left(x + 1\right)}^{\left(\frac{\frac{1}{n}}{2}\right)} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \log \left(e^{{\left(x + 1\right)}^{\left(\frac{\frac{1}{n}}{2}\right)} - {x}^{\left(\frac{\frac{1}{n}}{2}\right)}}\right)}\\
\mathbf{elif}\;\frac{1}{n} \le 1.1245365987981562 \cdot 10^{-11}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}} \cdot \sqrt[3]{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} - {x}^{\left(\frac{1}{n}\right)}}\right) \cdot \sqrt[3]{\left({\left(x + 1\right)}^{\left(\frac{\frac{1}{n}}{2}\right)} + {x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right) \cdot \frac{{\left({\left(x + 1\right)}^{\left(\frac{\frac{1}{n}}{2}\right)}\right)}^{3} - {\left({x}^{\left(\frac{\frac{1}{n}}{2}\right)}\right)}^{3}}{{\left(x + 1\right)}^{\left(\frac{1}{n}\right)} + \mathsf{fma}\left({x}^{\left(\frac{\frac{1}{n}}{2}\right)}, {\left(x + 1\right)}^{\left(\frac{\frac{1}{n}}{2}\right)}, {x}^{\left(\frac{1}{n}\right)}\right)}}\\
\end{array}double f(double x, double n) {
double r61207 = x;
double r61208 = 1.0;
double r61209 = r61207 + r61208;
double r61210 = n;
double r61211 = r61208 / r61210;
double r61212 = pow(r61209, r61211);
double r61213 = pow(r61207, r61211);
double r61214 = r61212 - r61213;
return r61214;
}
double f(double x, double n) {
double r61215 = 1.0;
double r61216 = n;
double r61217 = r61215 / r61216;
double r61218 = -7.380908236352897e-15;
bool r61219 = r61217 <= r61218;
double r61220 = x;
double r61221 = r61220 + r61215;
double r61222 = pow(r61221, r61217);
double r61223 = pow(r61220, r61217);
double r61224 = r61222 - r61223;
double r61225 = exp(r61224);
double r61226 = log(r61225);
double r61227 = cbrt(r61226);
double r61228 = cbrt(r61224);
double r61229 = r61227 * r61228;
double r61230 = 2.0;
double r61231 = r61217 / r61230;
double r61232 = pow(r61221, r61231);
double r61233 = pow(r61220, r61231);
double r61234 = r61232 + r61233;
double r61235 = r61232 - r61233;
double r61236 = exp(r61235);
double r61237 = log(r61236);
double r61238 = r61234 * r61237;
double r61239 = cbrt(r61238);
double r61240 = r61229 * r61239;
double r61241 = 1.1245365987981562e-11;
bool r61242 = r61217 <= r61241;
double r61243 = 1.0;
double r61244 = r61220 * r61216;
double r61245 = r61243 / r61244;
double r61246 = 0.5;
double r61247 = pow(r61220, r61230);
double r61248 = r61247 * r61216;
double r61249 = r61243 / r61248;
double r61250 = r61243 / r61220;
double r61251 = log(r61250);
double r61252 = pow(r61216, r61230);
double r61253 = r61220 * r61252;
double r61254 = r61251 / r61253;
double r61255 = r61215 * r61254;
double r61256 = fma(r61246, r61249, r61255);
double r61257 = -r61256;
double r61258 = fma(r61215, r61245, r61257);
double r61259 = r61228 * r61228;
double r61260 = 3.0;
double r61261 = pow(r61232, r61260);
double r61262 = pow(r61233, r61260);
double r61263 = r61261 - r61262;
double r61264 = fma(r61233, r61232, r61223);
double r61265 = r61222 + r61264;
double r61266 = r61263 / r61265;
double r61267 = r61234 * r61266;
double r61268 = cbrt(r61267);
double r61269 = r61259 * r61268;
double r61270 = r61242 ? r61258 : r61269;
double r61271 = r61219 ? r61240 : r61270;
return r61271;
}



Bits error versus x



Bits error versus n
if (/ 1.0 n) < -7.380908236352897e-15Initial program 3.3
rmApplied add-cube-cbrt3.3
rmApplied sqr-pow3.3
Applied sqr-pow3.3
Applied difference-of-squares3.3
rmApplied add-log-exp3.6
Applied add-log-exp3.6
Applied diff-log3.6
Simplified3.6
rmApplied add-log-exp3.6
Applied add-log-exp3.6
Applied diff-log3.6
Simplified3.6
if -7.380908236352897e-15 < (/ 1.0 n) < 1.1245365987981562e-11Initial program 45.3
Taylor expanded around inf 32.9
Simplified32.9
if 1.1245365987981562e-11 < (/ 1.0 n) Initial program 7.6
rmApplied add-cube-cbrt7.6
rmApplied sqr-pow7.6
Applied sqr-pow7.6
Applied difference-of-squares7.7
rmApplied flip3--7.7
Simplified7.7
Final simplification24.4
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1) (/ 1 n)) (pow x (/ 1 n))))