Skip to content

Instantly share code, notes, and snippets.

@hktaskin
Last active May 11, 2020 21:18
Show Gist options
  • Save hktaskin/658c64ee4d0aa2bca0dc73285ec6b3df to your computer and use it in GitHub Desktop.
Save hktaskin/658c64ee4d0aa2bca0dc73285ec6b3df to your computer and use it in GitHub Desktop.
PoW Wasted Power
// 2020.05.11 23:30 GMT+3
// https://btc.com/stats/pool?pool_mode=all
// http://magma.maths.usyd.edu.au/calc/
a := [230830, 54202, 48949, 32935, 32893, 23083, 20836, 19513, 18027, 17378, 15315, 12733, 11387, 11355, 6464, 6392, 629, 5753, 5672, 4845, 4177, 3595, 3127, 2445, 2428, 2093, 1918, 1895, 183, 1824, 1641, 1508, 1291, 129, 1254, 1002, 908, 816, 745, 703, 676, 623, 583, 517, 449, 445, 441, 346, 333, 333, 303, 297, 293, 285, 239, 226, 197, 188, 162, 153, 133, 116, 114, 113, 105, 91, 86, 77, 54, 52, 48, 48, 46, 44, 43, 42, 41, 40, 39, 29, 26, 22, 22, 20, 20, 16, 10, 10, 9, 8, 6, 5, 3, 1, 1, 1, 1, 1];
t := &+[i : i in a];
p := &+[(a[i]/t)*(1-(a[i]/t)) : i in [1..#a]]+0.;
print p;
// 0.835175146537319895727358956437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment