Last active
December 1, 2019 01:52
-
-
Save sundeepblue/11021065 to your computer and use it in GitHub Desktop.
Quickly estimate 2^64 without using a pen/papar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2^10=1024 ~10^3 | |
| 2^64=(2^10)^6 * 2^4 | |
| => (10^3)^6*16 | |
| => 10^18*16 | |
| => 1.6 * 10 ^ 19 | |
| = 16,000,000,000,000,000,000 | |
| Calculator says: 18,446,744,073,709,551,616 | |
| or: | |
| 2 ^ 10 = 1.024 * (10^3) | |
| 2 ^ 60 = (1.024 ^ 6) * (10 ^ 18) | |
| 2 ^ 64 = (16 * (1.024 ^ 6) * (10 ^ 18) ) | |
| All, we need to solve is 1.024 ^ 6. using binomial expansion, ignoring the smaller terms we get : (1 + 0.024) ^ 6 = 1 + 6 * 0.024 = 1.144 = 1.15 (approx) | |
| Hence the answer is : (16 * 1.15) * (10 ^ 18) = 18.4 * (10 ^ 18) | |
| It is much closer to the actual answer and very fast to calculate. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment