Post Reply 
(PC-1211) Multiple Dice Throw
03-23-2021, 03:56 PM (This post was last modified: 03-23-2021 04:04 PM by robve.)
Post: #8
RE: (PC-1211) Multiple Dice Throw
(03-23-2021 03:34 PM)Massimo Gnerucci Wrote:  Shouldn't you use RANDOM before invoking RND, unless you want to use the same seed each time?

RANDOM and RANDOMIZE set the seed of the sequence. Testing a PRNG is independent of its seeding. In other words, when a PRNG is periodic (all LCGs are but periods differ and large periods are preferable) it does not matter where you start. Also, most RANDOM implementations that take no seed value simply use TIME or some other system clock value.

Many mistakes in the past made cryptographic operations insecure because the PRNG was predicable and the seed was simply TIME, which is also predictable see e.g. random number generator attacks such as the successful attack on Netscape's secure HTTPS page browsing. By contrast, modern CPUs offer RDRAND or similar instructions for "true" randomness required by secure cryptographic operations.

EDIT: answer: setting B=0 (the seed) or not using RANDOM in the other code does not help or hinder. Running the programs multiple times with or without seeding produces very similar results.

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(PC-1211) Multiple Dice Throw - SlideRule - 03-20-2021, 11:48 AM
RE: (PC-1211) Multiple Dice Throw - C.Ret - 03-21-2021, 09:29 AM
RE: (PC-1211) Multiple Dice Throw - robve - 03-23-2021, 02:43 PM
RE: (PC-1211) Multiple Dice Throw - robve - 03-23-2021 03:56 PM
RE: (PC-1211) Multiple Dice Throw - pyedog - 03-23-2021, 04:06 PM



User(s) browsing this thread: 1 Guest(s)