On Wednesday 26 August 2009 23:19:18 Celejar wrote: > On Wed, 12 Aug 2009 15:26:06 -0500 > "Boyd Stephen Smith Jr." <email@example.com> wrote: > > $RANDOM gives a random number. It has a relatively large range, I think > > 0-32K maybe even larger. > > ... > > > Examples: > > echo $((RANDOM % 6 + 1)) # Rolls a "normal" die. > > ... > > >  But not a fair one. If the $RANDOM function is completely random, so > > that over the "long tail" all values show up with the same frequency, the > > die will be slightly biased low. > > Do you mean that it will be biased low since the range (presumably) > doesn't end on a number of the form 6n-1, or something else? Yes. That's all I meant. ISTR some roguelikes use code to correct for this low bias. -- Boyd Stephen Smith Jr. ,= ,-_-. =. firstname.lastname@example.org ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
Description: This is a digitally signed message part.