This is my code
Table[With[{x = 10^n + 1/17}, N[x, {Infinity, 5}]], {n, 0, 5}] // Column
Or like this
SetAccuracy[Table[With[{x = 10^n + 1/17}, N[x]], {n, 0, 5}], 5] // Column
Actually I just want 5-digit accuracy (effective number of digits to the right of the decimal point) and any precision. But the accuracy is 4 and sometimes it is 5.
Update
The documentation has this usage as above
So is it a bug in function of N
?
N
takes its accuracy/precision arguments in base 10, but actually constructs a binary result that best captures your specification. Note words like attempts and at most in the documentaiton forN
$\endgroup$N
but a rather glaring omission in the docs to give that example and fail to point out that the accuracy does not always guarantee an exact number of decimal digits ultimately get displayed. $\endgroup$