by Té Rowan » Thu Feb 19, 2026 1:07 pm
V. bummed last night. Wrote own rand48. Less bummed now.
Note: rand48 is a random number generator. Oh, what did they call it... ah! a Linear Congruential Random Number Generator. They work by multiplying a first whole number with a second one, adding a third, and finally dividing with a fourth and using the remainder as the new first number.
rand48 uses 48-bit numbers, and gives you the top 32 bits of the first number as your 'random' number. You can probably do a bit more with it than just decide whether to run away or hit the dwarf with your axe.
“Now too-too cute girl must face dreaded Amazon technique, feared by all the Chinese Emperors (when they is small children) all through history! I Katchu & Tickle Amaguriken!" (dogbertcarroll, “Ranma’s Daughter: The Battle of Stolen Nose”)