double code(double x, double n) {
return ((double) (((double) pow(((double) (x + 1.0)), ((double) (1.0 / n)))) - ((double) pow(x, ((double) (1.0 / n))))));
}
double code(double x, double n) {
double VAR;
if ((n <= -3526319384090.8047)) {
VAR = ((double) (((double) (1.0 / x)) * ((double) (1.0 / n))));
} else {
double VAR_1;
if ((n <= 3.0876165420064856)) {
VAR_1 = ((double) (((double) pow(((double) (x + 1.0)), ((double) (1.0 / n)))) - ((double) pow(((double) pow(x, ((double) (1.0 / ((double) (((double) cbrt(n)) * ((double) cbrt(n)))))))), ((double) (1.0 / ((double) cbrt(n))))))));
} else {
VAR_1 = ((double) (((double) (1.0 / x)) / n));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus x



Bits error versus n
Results
if n < -3526319384090.8047Initial program 44.7
rmApplied add-cube-cbrt44.7
Applied *-un-lft-identity44.7
Applied times-frac44.7
Applied pow-unpow44.7
Taylor expanded around -inf 64.0
Simplified31.7
rmApplied *-un-lft-identity31.7
Applied times-frac31.0
if -3526319384090.8047 < n < 3.0876165420064856Initial program 3.1
rmApplied add-cube-cbrt3.2
Applied *-un-lft-identity3.2
Applied times-frac3.2
Applied pow-unpow3.2
if 3.0876165420064856 < n Initial program 44.7
rmApplied add-cube-cbrt44.7
Applied *-un-lft-identity44.7
Applied times-frac44.7
Applied pow-unpow44.7
Taylor expanded around -inf 64.0
Simplified32.7
rmApplied associate-/r*32.0
Final simplification23.7
herbie shell --seed 2020192
(FPCore (x n)
:name "2nthrt (problem 3.4.6)"
:precision binary64
(- (pow (+ x 1.0) (/ 1.0 n)) (pow x (/ 1.0 n))))