Patent ID: 8443021

Claim:
A system for debugging a simulation program on a computer, the system comprising: a processor for calculating a random number sequence using the steps of: taking two distinct odd primes p 1 , p 2 in such a way that integers q 1 :=( p 1 −1)/2 , q 2 :=( p 2 −1)/2 are mutually coprime with one of q 1 , q 2 is odd and the other is even; taking the integer d=p 1 p 2 as the product of said odd primes p 1 and p 2 ; taking a primitive root z 1 modulo said odd prime p 1 and a primitive root z 2 modulo said odd prime p 2 ; constructing the sequence of integers {r 1 , r 2 , r 3 , . . . } by realizing recursive congruence relations r 1 ≡n mod( d ), r k+1 ≡zr k mod( d ), 1 ≦r k <d, k= 1,2, . . . for an arbitrarily given initial value n coprime with said d, where z is determined modulo d uniquely by congruence relations z≡z 1 mod( p 1 ), z≡z 2 mod( p 2 ); obtaining the sequence {v 1 , v 2 , . . . } by realizing the arithmetic v k =r k /d, k= 1,2,3, . . . ; and outputting {v 1 , v 2 , v 3 . . . } as the aimed sequence for uniform and independent random numbers, wherein the multiplicative congruential random number generator (d; z) defined by said modulus d and said multiplier z shows 2nd degree and 3rd degree spectral test performances, which is the same as that two dimensional vectors of the form v=(j 1 ,j 2 ) with integer coordinates fulfilling j 1 +zj 2 ≡0 mod( d ) and with non-zero length ∥v∥=(j 1 2 +j 2 2 ) 1/2 >0 have their shortest vector v min with the property ∥ v min ∥>2 1/2 d 1/2 /(1.25×3 1/4 ) and as that three dimensional vectors of the form v=(j 1 , j 2 , j 3 ) with integer coordinates fulfilling j 1 +zj 2 +z 2 j 3 ≡0 mod( d ) and with non-zero length ∥v∥=(j 1 2 +j 2 2 +j 3 2 ) 1/2 >0 have their shortest vector v min , with the property ∥ v min ∥>2 1/6 d 1/3 /1.25; and a memory that stores a simulation program suitable for operation on a computer, wherein the calculated random number is reproducible and transportable allowing for debugging, via the processor, the simulation program stored in memory, and saving the debugged simulation in the memory.