Re:To approximate 52! by hand, compute 54! and divide by 3000
by etendue on Sunday June 05, 2016 @09:10AM
(#11840744)
How does the 2^10 to 10^3 approximation come about? All of the others made sense to me, but I couldn't figure that one out.
[ Parent
| on HN ]
Re:To approximate 52! by hand, compute 54! and divide by 3000
by hyperpape on Sunday June 05, 2016 @09:13AM
(#11840759)
2 ^ 10 = 1024.
That's one of those "shout it from the rooftops" approximations for programmers. I use it constantly.
Re:To approximate 52! by hand, compute 54! and divide by 3000
by Sharlin on Sunday June 05, 2016 @12:11PM
(#11841609)
And this is why base-ten and base-two file and memory sizes are roughly equivalent (which is somewhat useful but also causes a lot of confusion):
2^10 bytes = 1 kiB ≈ 1 kB = 10^3 bytes
2^20 bytes = 1 MiB ≈ 1 MB = 10^6 bytes
2^30 bytes = 1 GiB ≈ 1 GB = 10^9 bytes
2^40 bytes = 1 TiB ≈ 1 TB = 10^12 bytes
and so on. The relative error does grow as you move to larger and larger powers, though.
Re:To approximate 52! by hand, compute 54! and divide by 3000
by impendia on Sunday June 05, 2016 @12:36PM
(#11841724)
As the other answers point out, it follows from explicit computation. Let me add that there's no particularly good a priori reason to expect this particular coincidence. It just happens.
Re:To approximate 52! by hand, compute 54! and divide by 3000
by ColinWright on Sunday June 05, 2016 @09:13AM
(#11840757)
Compare 1000 with 1024.
As I say above, 2^10 is bigger than 10^3 by 2.4%. When we raise it to the power of 5 we are wrong by 12.6%.