https://en.wikipedia.org/wiki/Linear_congruential_generator
Usage:
seed=rands(0,1,1)[0]; //ironic
echo(Linear_Congruential_Generator(seed));
function Linear_Congruential_Generator
(seed=0,modulus=1e64, a=6364136223846793005, c=1442695040888963407)=
(a * seed + c) % modulus;
No comments:
Post a Comment