If you use something like four bytes instead of one, your error drops dramatically… If you’re generating numbers from 0-100, You’d have ~50 “bad” cases (just imagine the remainder is the same) out of 4 billion instead of ~50 out of 256. Unless you’re running a casino or something (and even then…) it’s probably “fine enough” but of course you have to know about it!
If you use something like four bytes instead of one, your error drops dramatically… If you’re generating numbers from 0-100, You’d have ~50 “bad” cases (just imagine the remainder is the same) out of 4 billion instead of ~50 out of 256. Unless you’re running a casino or something (and even then…) it’s probably “fine enough” but of course you have to know about it!