On Thu, 31 Mar 2005, Antonio Rodr�guez wrote:

> Applesoft Basic's random number generator is surprisingly good when
> compared with those implemented in other flavours of Microsoft Basic
> (specially the GW-BASIC and QBASIC series from the IBM PC!). I don't think
> the figures you're getting are bad at all, but you have to take into
> account the way random numbers are generated by a computer.

Nevermind the hardware and the available resources for the entropy.  At 
one point Linux had one of the best functions for making the number as 
random as possible.  There is some information out there on suggested ways 
to generate entropy and as I recall, they implemented all of them in 
Linux.  

> To generate random numbers, the computer takes an integer "seed" (more on
> this later), makes some obscure transformations on it, and with the number
> obtained, it calculates the random number (in the range [0..1] ) and
> re-initializes the seed. The transformations are built in a way that
> there's no way to say what will result from a given seed. Other factors,
> such as the system date and time, or an internal counter in the processor,
> can be taken to make the proccess more random.


FWIW, a friend of mine read from the joystick port with no joystick 
connected (under Apple DOS 3.3) to help seed the random number generator.  
It worked pretty well.  

Sean...

--
The punk rock will get you if the government don't get you first.
        --Old 97's
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
KG4NRC  http://www.rimboy.com  Your source for the crap you know you need.


--
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