On Mar 31, 2005, at 1:30 AM, Antonio Rodr�guez wrote:

Hi!

The matter is that gcc's standards libraries use a 32 or 64-bit seed (can't
remember what size it is exactly), but Applesoft (as all 8-bit Basic
flavour I know about) use a 16-bit seed.

Because of that (the 16-bit versus 32/64-bit seed), if your program runs
for large periods of time without asking for a keypress, it is in clear
disadvantage against the Linux version, and can start spitting the same
series of "random" numbers periodically. In theory, this should happen
before the 65,536th (2^16) iteration of the loop.

And that loop only has a run of 18 heads or tails in it. :^(

1) I am not seeding the random number generator... what's a simple way?

2) I am generating lots of numbers without key presses.. I wonder if
I should generate a large integer then use even/odd-ness for my coin flip.




--
Apple2list is sponsored by <http://lowendmac.com/> and...

   /      Buy books, CDs, videos, and more from Amazon.com     \
  / <http://www.amazon.com/exec/obidos/redirect-home/lowendmac> \

     Support Low End Mac <http://lowendmac.com/lists/support.html>

Apple2list info:        <http://lowendmac.com/lists/apple2.html>
 --> AOL users, remove "mailto:";
Send list messages to:  <mailto:[email protected]>
To unsubscribe, email:  <mailto:[EMAIL PROTECTED]>
For digest mode, email: <mailto:[EMAIL PROTECTED]>
Subscription questions: <mailto:[EMAIL PROTECTED]>
Archive: <http://www.mail-archive.com/apple2list%40mail.maclaunch.com/>

iPod Accessories for Less
at 1-800-iPOD.COM
Fast Delivery, Low Price, Good Deal
www.1800ipod.com

Reply via email to