CompuServe Messages

Random number generator

    12-Nov-91 02:05:17
Fm: daniel wolf 70250,626
To: Harry Manolopoulos 75410,322
if you want a file of 'random' numbers, here's a simple suggestion: first use a compression scheme on any text file you desire, then use any 'encrypt' program on the resulting compressed file. the result of this two-step process will be a file of fairly good quality random stuff. there are so many public domain compression and encrypt programs out there that you may not have to re-invent this wheel, simply have your program reference an external file of random stuff which you can have any size you want. it is usually hard to guarantee that a pseudorandom number generator will go very long without repeating. there is also (if you insist) and 'random' function in the Amiga C language support stuff which I've seen referenced in the AutoDocs – and I think the .asm version of the algorithm is also there.