Randomness

version 1/080522 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 4 - Getting a random number

    To decide what number is the next random number of (prng - a pseudorandom number generator):
        let current value be the previous value of prng;
        let current value be current value * multiplier of prng;
        let current value be current value + adder of prng;
        change previous value of prng to current value;
        decide on current value.

    To decide what number is the previous random number of (prng - a pseudorandom number generator):
        decide on previous value of prng.

    To decide what number is the next random number:
        decide on the next random number of the main pseudorandom number generator.

    To decide what number is the previous random number:
        decide on the previous random number of the main pseudorandom number generator.