325
submitted 11 months ago by Jakylla@sh.itjust.works to c/xkcd@lemmy.world

cross-posted from: https://programming.dev/post/8677292


Transcript:

[A computer program.]

int getRandomNumber()
{
   return 4; // chosen by fair dice roll.
             // guaranteed to be random.
}

Hover Text:

RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.

you are viewing a single comment's thread
view the rest of the comments
[-] lamabop 20 points 11 months ago

Incredible, cracked the pseudorandomness problem with this simple code that guarantees a random whole number greater than 3 and less than 5.

this post was submitted on 20 Jan 2024
325 points (99.1% liked)

xkcd

8961 readers
117 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 2 years ago
MODERATORS