[Coco] Is the RND command really generating a random number?

Mathieu Bouchard matju at artengine.ca
Fri May 19 10:03:06 EDT 2017


Old Microsoft BASICs use this :
https://en.wikipedia.org/wiki/Linear_congruential_generator

But in particular, they use a particularly low quality version of it. (see what 
I say about QuickBASIC's RND() in the other message I just sent.)


Le 2017-05-19 à 00:47:00, Rietveld Rietveld a écrit :

> I am not sure how the command itself generates the 'random' number?
>
> Sent from my BlackBerry 10 smartphone.
>  Original Message
> From: Dave Philipsen
> Sent: Thursday, May 18, 2017 8:44 PM
> To: CoCoList for Color Computer Enthusiasts
> Reply To: CoCoList for Color Computer Enthusiasts
> Subject: Re: [Coco] Is the RND command really generating a random number?
>
>
> Very few things in the computer world are truly random.  A better term
> might be 'pseudo-random'.  Think about it.  In theory if you turn on two
> identical CoCos at the same time and ask for a random number at the same
> time they should both provide the same random number.  So, in reality,
> it's not random.
>
> Dave
>
> On 5/18/2017 7:39 PM, Rietveld Rietveld wrote:
>> I used the RND command to generate a random game play option in the cocoflash, but it doesn't seem to be very random. Some titles come up more than the laws of probability would suggest is possible.   instead I am now using a small math equation that uses a PEEK of the clock value.   This has resulted in a far more random looking selection
>>
>> Sent from my BlackBerry 10 smartphone.
>>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco

  ______________________________________________________________________
| Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC


More information about the Coco mailing list