5 ms·
Even worse, the given linear congruential RNG yields only 12445 distinct numbers, then repeats itself. It would be sensible to simply use better parameters for
by xenonite 3y ago
Even worse, the given linear congruential RNG yields only 12445 distinct numbers, then repeats itself. It would be sensible to simply use better parameters for this algorithm.
- smallstepforman 3y agoEngineering is a compromise, for simple tasks (eg motion of particle is smoke trail exhaust), you need a simple yet FAST rng. For cryptography, casino gaming etc, not only do you use a better Rng with at least 32 byte state, you also cycle the engine at random intervals to further prevent predicting the outcome.
- loeg 3y agoAn LCG with better parameters would be just as fast.