💾 Archived View for thrig.me › blog › 2023 › 07 › 14 › badnumbers.c captured on 2024-05-10 at 12:23:15.
⬅️ Previous capture (2023-07-22)
-=-=-=-=-=-=-
#include <stdio.h> int seed = 1; // the rogue 3.6.3 random number generator #define RN (((seed = seed * 11109 + 13849) & 0x7fff) >> 1) int coinflip(void) { return RN & 1; } int main(void) { for (int i = 0; i < 100; i++) printf("%d ", coinflip()); putchar('\n'); }