streetlight :marble_asexual: is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

Neat trick to generate a random byte value:

floor((14d20 - 14) * 256/266) - 1

Only requires d20s and a pen/paper

I spent way too much time making sure this was correct

And you know I think I found a simpler way

I originally thought 13d20 (mod 256) would unjustly favor the numbers 0-12, but as you can see from the original toot I later realized that since dice can’t roll 0s you have to do some fenangling with addition and such. But since dice can’t roll zeroes the minimum you can roll before taking a modulus is 13 if they all rolled 1s, so that means 0-12 won’t be double counted on taking the modulus

No actually this is wrong too, 256-260 isn’t 13 lmao

streetlight :marble_asexual: @jelle_dc

@jordyd I was gonna say roll 128 d20 and then do integer division by 10 but that doesn't work either so take this proposal instead:

flip 8 coins in order and interpret them as 1/0 binary digits

· Web · 0 · 1