Package io.github.olyutorskii.aletojio.rng.lcg


package io.github.olyutorskii.aletojio.rng.lcg
Linear congruential generator(LCG) implementations.

LCG is a commonly used random number generator in the past. Random is also a kind of LCG.

Recurrence relation sequences : X(n+1) = (X(n) * Mul + Inc) mod Mod

  • Mul : Multiplier
  • Inc : Increment
  • Mod : Modulus

Provides compatibility with well-known random number generators of the past.

  • RANDU : IBM Scientific Subroutine Library for IBM System/360
  • MINSTD0 : C++11's minstd_rand0
  • MINSTD : C++11's minstd_rand
  • GLIBC : glibc rand()
  • LRAND48 : glibc lrand48()
  • MRAND48 : glibc mrand48()
See Also: