fazlinmi83

12 Reputation

2 Badges

17 years, 51 days

MaplePrimes Activity


These are questions asked by fazlinmi83

i've read one RNG source code from an article and some of the code are not clear to me. The source code is

proc()

local t;

global seed;

      seed:=irem(a*seed,p);

      t:=seed;

      to concats do seed:=irem(a*seed,p) t:=s*t+seed; end do;

end proc();

 

i've a problem to understanding the concept of generating random number by using modulo. The basic modulo , let say a:= e mod m and i want to extend it to

x 0 = given,     x n+1 = P 1 x n + P 2       (mod N)    n = 0,1,2,...     (*)

But then how to implement that modulo to generate the random generator? and my latpop just 32 bits only. anybody would help me??

Page 1 of 1