Created
May 3, 2015 18:38
-
-
Save cohei/9bf6fbcc7db55812c2da to your computer and use it in GitHub Desktop.
3のつく数字と3の倍数でアホになる
This file contains 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
ghcによるアホ率の計算 | |
10^1 0.3 | |
10^2 0.45 | |
10^3 0.513 | |
10^4 0.5625 | |
10^5 0.60633 | |
10^6 0.645705 | |
10^7 0.6811353 | |
10^8 0.71302185 | |
10^9 0.741719673 | |
10^10 0.7675477065 | |
real 92m35.189s | |
user 77m30.988s | |
sys 1m21.257s | |
n桁以内の数字で3のつく数は全体の | |
1-(9/10)^n | |
これだけでn->無限の極限でアホ率は1とわかる | |
これと独立に3の倍数があるとすると | |
アホ率は | |
1-(2/3)*(9/10)^n | |
この式で計算すると大きい数で特によく一致 | |
0.4 | |
0.45999999999999996 | |
0.514 | |
0.5626 | |
0.6063399999999999 | |
0.6457059999999999 | |
0.6811354 | |
0.7130218599999999 | |
0.7417196739999999 | |
0.7675477065999999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment