Consider the following code:
hz = N[28 2^(-(n/6)) , {Infinity, 3}]; Column[Table[{n, hz}, {n, 36, 41}]]
Why do I get two different types of results digitwise?
Thanks both.
Because the numbers in 28 2^(-(n/6)) are approximated, resulting in 7.00 2.00^(2.00 - 0.17 n) for hz, the values of hz for the integers n in the Table are computed and the propagated rounding error represented by the Precision of the number is calculated and stored as the Precision of the result. If you put the N[...] inside Table, it will do what you expected.
28 2^(-(n/6))
7.00 2.00^(2.00 - 0.17 n)
hz
n
Table
Precision
N[...]
N makes a number with accuracy '3'. But the displaying of these numbers is a different thingÂ…
To control the displaying of numbers use e.g. NumberForm:
hz=28 2^(-(n/6)); Column[Table[{n,NumberForm[N@hz,{\[Infinity],3}]},{n,36,41}]]