Abstract:
A method of obtaining uniform and independent random numbers is given
       1. by taking two distinct odd primes p 1 ,p 2  that give mutually coprime integers, an odd q 1 =(p 1 −1)/2 and an even q 2 =(p 2 −1)/2, to form the modulus d=p 1 p 2 ,   2. by taking primitive roots z 1 ,z 2  of primes p 1 ,p 2 , respectively, and giving congruence relations z≡−z 1  mod (p 1 ) and z≡z 2  mod (p 2 ) that determine the multiplier z uniquely modulo d, and   3. by taking an initial value n coprime with d=p 1 p 2 .
 
The method generates the sequence of integers {r j |1≦j≦T=2q 1 q 2 } recursively by congruence relations
   r 1 ≡n mod(d), r j+1 ≡zr j  mod (d), 0&lt;r j &lt;d, 1≦j≦T=2q 1 q 2 ,
 
and gives {v 1 =r 1 /d,v 2 =r 2 /d, . . . } for output of uniform and independent random numbers.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to methods of obtaining uniform and independent random numbers on computers. More specifically, said methods relate to the multiplicative congruential generator comprising
       1. a positive integer d called modulus,   2. a positive integer z called multiplier that is coprime with d, namely that shares no common prime factors with d, and   3. a positive integer n called initial value or seed coprime with d,
 
generating a sequence of integers {r 1 , r 2 , r 3 , . . . } by recursive congruence relations
       
 
         [0000]        r   1   ≡n  mod( d ),  r   1+1   ≡zr   j  mod( d ), 0&lt; r   j   &lt;d, j =1,2,3, . . . , 
         [0000]    and giving an output sequence {v 1 , v 2 , v 3 , . . . } of rational numbers in the interval ( 0 ,  1 ) by realizing the arithmetic 
         [0000]        v   j   :=r   j   /d, j =1,2,3, . . . . 
         [0006]    2. Description of the Related Art 
         [0007]    An odd prime modulus d=p≧3 has the primitive root multiplier z that generates the cyclic sequence {z, z 2 , z 3 , . . . , z p−1 ≡1}. In the sense of congruence modulo p, members of this sequence sweep over all integers coprime with p in a period T=p−1≈d, and present a realization of uniform distribution. Yet, an odd d=p≧3 gives q=(p−1)/2 as an integer, and the cyclic sequence of any primitive root z includes z T/2 =z q ≡−1 mod (p) inevitably. Thus, the last half of the sequence {z q+1 ≡−z, z q+2 ≡−z 2 , . . . , z 2q ≡−z q } is essentially a repetition of the first half. The use of a primitive root cyclic sequence for independent random numbers should be restricted to its half period T/2≈d/2. 
         [0008]    The preceding patent application Ser. No. 12/379,964 proposed the method to generate uniform and independent random numbers comprising the steps of:
       1. taking two odd primes p 1  and p 2  that give mutually coprime integers       
 
         [0000]        q   1 :=( p   1 −1)/2 , q   2 :=( p   2 −1)/2
           with q 1  odd and q 2  even,       2. taking primitive roots z 1  and z 2  of prime moduluses p 1  and p 2 , respectively,   3. forming the modulus d=p 1 p 2 ,   4. solving congruence relations for the multiplier z,       
 
         [0000]        z≡z   1  mod( p   1 ),  z≡Z   2  mod( p   2 )           that determine z uniquely modulo d=p 1 p 2  by Chinese remainder theorem,       5. forming the integer sequence {r 1 , r 2 , . . . } for any seed n coprime with d by r 1 ≡n mod(d), r j+1 ≡zr j  mod(d), 0&lt;r j &lt;d. 1≦j≦T=2q 1 q 2 ,   6. and outputting the sequence {v 1 , v 2 , . . . } by realizing the arithmetic         
         [0000]        v   j   =r   j   /d,  0&lt; v   j &lt;1, 1≦ j≦T= 2 q   1   q   2 ,
           as uniform and independent random numbers.
 
For any choice of n the period T of {r 1 , r 2 , . . . } is the order ord(z) of the multiplier z modulo d=p 1 p 2  and coincides with the period of the sequence {(z 1   j , z 2   j ) mod(p 1 ,p 2 )|j=1, 2, . . . } of vectors by the correspondence (group isomorphism) given by Chinese remainder theorem. Here, mod(p 1 ,p 2 ) implies that integers z 1   j  and z 2   j  are taken modulo p 1  and p 2 , respectively. Cyclic sequences {z 1   j  mod(p 1 )} and {z 2   j  mod(p 2 )} have periods 2q 1  and 2q 2 , respectively, with coprime odd q 1  and even q 2 . Therefore, the sequence {r 1 , r 2 , . . . , r T } shares the least common multiple period T=2q 1 q 2 ≈d/2 with the vector sequence. This setting prevents −1 to appear in the cyclic sequence {z j  mod (d)|1≦j&lt;T=2q 1 q 2 }; z j ≡−1 can arise only at the half period T/2=q 1 q 2 , but the vector (Z 1   T/2 , z 2   T/2 ) mod (p 1 ,p 2 ) is
           
 
         [0000]      ( z   1   q1q2   ,z   2   q1q2 )≡((−1) q2 ,(−1) q1 )≈(1,−1)≠−(1,1)mod( p   1   ,p   2 ).
 
         [0000]    Thus, the sequence {v j |1≦j≦T=2q 1 q 2 ≈d/2} of patent application Ser. No. 12/379,964 may be used wholly for uniform and independent random numbers. If n is a member of the cyclic sequence with n≡z k  mod (d), then {nz≡z k+1 , nz 2 ≡z k+2 , . . . } is a mere translation of the cyclic sequence. If n is coprime with d but is not a member of the cyclic sequence generated by z, then {nz, nz 2 , nz 3 , . . . , nz T ≡n} with T=2q 1 q 2  shares the same period, but has no common elements, with the cyclic sequence. In terms of groups this is the coset of the cyclic subgroup generated by z. In the way of construction of patent application Ser. No. 12/379,964, members of cyclic and coset sequences form the division of integers coprime with d. 
         [0018]    The present invention adopts the same setting as patent application Ser. No. 12/379,964 for the modulus d, but replaces the primitive root z 1  with any non-primitive integer y 1  with the half-full order q 1  modulo p 1 , and adopts the multiplier z′ determined by congruence relations 
         [0000]        z′≡y   1  mod( p   1 ),  z′≡z   2  mod( p   2 ). 
         [0000]    Sequences {(z′) j  mod (d=p 1 p 2 )|j=1, 2, . . . } and {(y 1   j ,z 2   j ) mod (p 1 ,p 2 )|j=1, 2, . . . } again share the same period. As ord(y 1 )=q 1  mod (p 1 ) is odd, ord(z 2 )=2q 2  mod (p 2 ) is even and as q 1  and q 2  are coprime, the period is T=2q 1 q 2 . And, the integer y 1  with an odd order never gives (y 1 ) j ≡−1 mod (p 1 ) and the sequence {(z′) j  mod (d=p 1 p 2 )|1≦j≦T} is devoid of −1. The whole period of the coset sequence of the present invention, 
         [0000]      { r   j   ≡n ( z ′) j  mod( d )|0&lt; r   j   &lt;d=p   1   p   2 , 1≦ j≦T= 2 q   1   q   2 }
 
         [0000]    may again be used for uniform and independent random numbers. 
         [0019]    The design of generators of uniform and independent random numbers necessarily calls for some tests of the resulting sequence. Spectral tests utilize the following fact. Consider a modulus d and a multiplier z coprime with d. Consecutive s-tuples of the cyclic sequence generated by z modulo d, as well as consecutive s-tuples of any coset sequence, generate points in the s-dimensional Euclidean space E, that notably occupy a portion (but not all) of points of a lattice determined by d and z. A little more surprising fact is that any consecutive s-tuples taken from any sequence of integers are again approximated by points of some lattice. This general statement is of little help in evaluating the performance of an arbitrary integer sequence in giving independent and uniform random numbers; as the presence of any lattice cannot usually be recognized in plotting s-tuples of such integer sequence in E s , integer sequences almost invariably give points in E, that occupy only a negligibly small portion of the noted lattice. Yet, there are conspicuous exceptions. A prime modulus d=p and its primitive root multiplier z generate a cyclic sequence that gives s-tuples forming p−1 points in E s , where the noted lattice gives p lattice points. In the setting of the present and the preceding inventions with the modulus d=p 1 p 2  formed by odd primes p 1  and p 2 , multipliers z′ as well as z constructed in noted special ways generate cyclic sequences whose consecutive s tuples occupy 2q 1 q 2 ≈d/2 of points that are nearly the half of d lattice points, with similar 2q 1 q 2  points from the coset sequence occupying almost all of the remaining half. In these cases the configuration of the lattice gives significant indications of the mode of distribution of consecutive random numbers, hence on the mode of independence, given by multiplicative congruential methods. These structures, and in particular the new perception of the following symmetries (or asymmetries) motivated for the present invention. 
         [0000]    Lemma 1. Let an odd prime p 1 ≧3 give the odd integer q 1 =(p 1 −1)/2. Then, any integer y 1  with the half full order ord(y 1 )=q 1  modulo p 1  is necessarily the minus of a primitive root z 1  of p 1 ,y 1 ≡−z 1  mod (p 1 ). Conversely, any primitive root z 1 ′ of p 1  is the minus of an integer y 1 ′ with the half full order modulo p 1 , z 1 ′ mod (p 1 ).
 
Lemma 2 Let an odd prime p 2 ≧3 give the even integer q 2 =(p 2 −1)/2, and let z 2  be a primitive root of p 2 . Then the integer z 2 ″≡−z 2  mod (p 2 ) is also a primitive root of p 2 .
 
Corollary 3. Let odd primes p 1 ≧3 and p 2 &gt;3 give mutually coprime integers
 
         [0000]        q   1 :=( p   1 −1)/2 , q   2 :=( p   2 −1)/2
 
         [0000]    with odd q 1  and even q 2 . Call an integer z to be in class I modulo d=p 1 p e  if it is coprime with d and determined by congruence relations 
         [0000]        z≡z   1  mod( p   1 ),  z≡z   2  mod( p   2 ), 
         [0000]    with a primitive root z 1  of p 1  and a primitive root z 2  of p 2 . Also call an integer z′ to be in class II modulo d if it is coprime with d and determined by congruence relations 
         [0000]        z′≡y   1 ′ mod( p   1 ),  z′≡z   2 ′ mod( p   2 ),
 
         [0000]    with an integer y 1 ′ that has the half-full order ord(y 1 ′)=q 1  mod (p 1 ) and with a primitive root z 2 ′ of p 2 . Then a class II multiplier is the minus of a class I multiplier modulo d, and a class I multiplier is the minus of a class II multiplier modulo d. In this correspondence a class I multiplier and a class II multiplier share identical valuations in spectral tests, and the spectral tests need be performed on either one of multipliers. 
         [0020]    (Proof of Lemma 1) Put j=ord(−y 1 ) mod (p 1 ). By definition j is the smallest positive integer that gives (−y 1 ) j ≡1 mod (p 1 ). There exist two alternative possibilities: 
         [0000]      (−1) j =−1, ( y   1 ) j ≡−1 mod( p   1 ),  (a)
 
         [0000]      or 
         [0000]      (−1) j =1, ( y   1 ) j ≡1 mod( p   1 ).  (b)
 
         [0000]    The case (a) requires that j is odd and, since the order of y 1  is q 1  modulo p 1 , also that j is an odd multiple of q 1 /2. This latter requirement cannot be met by an integer j because q 1  is odd by assumption. The remaining (b) requires that j is even and j is a multiple of q 1 , thus selecting even multiples of the odd q 1  for j. Hence ord(−y 1 )=2q 1  mod (p 1 ) holds true, and z 1 =−y 1  is a primitive root of p 1 , proving y 1 ≡−z 1  mod (p 1 ) for some primitive root z 1  of p 1 . Conversely, take any primitive root z 1 ′ of p 1 , put y 1 ′≡−z 1 ′, and let j=ord(y 1 ′) mod (p 1 ). There should hold 1≡(−z 1 ) j  mod (p 1 ), giving the following two possibilities: 
         [0000]      (−1) j =−1, ( z   1 ′) j ≡−1 mod( p   1 ),  (c)
 
         [0000]      or 
         [0000]      (−1) j =1, ( z   1 ′) j ≡1 mod( p   1 ).  (d)
 
         [0000]    The case (c) requires an odd integer j that is also an odd multiple of the half order q 1  of the primitive root z 1 ′. Hence any odd multiples of odd q 1  is admitted by (c) for j. The second half of the case (d) admits any integral multiples of ord(z 1 ′)=2q 1 , and these automatically let the first half hold. The smallest positive of these gives j=q 1 =ord(y 1 ′). Thus, any primitive root z 1 ′ of p 1  has the expression z 1 ′=−y 1 ′ by an integer y 1 ′ with the half-full order q 1 . 
         [0021]    (Proof of Lemma 2) Let the prime p 2  have a primitive root z 2  with the order ord(z 2 )=p 2 −1=2q 2 ; by assumption q 2  is even. Let j be the order of y 2 ≡−z 2  mod (p 2 ). The integer j fulfills one of the following: 
         [0000]      (−1) j =1 , z   2   j ≡−1 mod( p   2 ),  (a)
 
         [0000]      or 
         [0000]      (−1) j =1 , z   2   j ≡1 mod( p   2 ).  (b)
 
         [0000]    The case (a) requires that j is odd and is an odd multiple of q 2 , the half order of the primitive root z 2 . But q 2  is even by assumption, and (a) can never be satisfied. The case (b) requires an even j that is also an integral multiple of the even ord(z 2 )=2q 2 . As the smallest positive of such, the order j of y 2 ≡−z 2  mod (p 2 ) is 2q 2 , and is again a primitive root of p 2 . 
         [0022]    (Proof of Corollary 3) Let z be a class I multiplier modulo d corresponding the vector (z 1 , z 2 ) with a primitive root z 1  of p 1  and a primitive root z 2  of p 2 . Lemmas 1 and 2 give 
         [0000]      ( z   1   ,z   2 )≡(− y   1   ′,−z   2 ′)≡−( y   1   ′,z   2 ′)mod( p   1   ,p   2 ),
 
         [0000]    where y 1 ′ has the half-full order q 1  modulo d and z 2 ′ is a primitive root modulo p 2 . Let the class II multiplier z′ correspond to the vector (y 1 ′, z 2 ′). The correspondence (group isomorphism) ensured by Chinese remainder theorem translates the above relation of vectors as follows: 
         [0000]        z≡−z ′ mod  (d).
 
         [0000]    The converse statement z′≡−z mod (d) is manifest. Arithmetically, the s dimensional spectral test for a multiplier z and a modulus d takes the vector (j 1 , j 2 , . . . , j s ) of integers fulfilling 
         [0000]        j   1   j   2   z′+ . . . +j   s ( z ′) s− ≡0 mod( d )
 
         [0000]    with {j k =±1, ±2, . . . |1≦k≦s}, calculates its Euclidean length 
         [0000]      λ=∥( j   1   ,j   2   , . . . , j   s )∥=( j   1   2   +j   2   2   + . . . +j   s   2 ) 1/2 ,
 
         [0000]    searches for the smallest positive value λ min  of such lengths, and gives the valuation d/λ min  for the multiplier z. Thus, the test evaluates the class I multiplier z and its corresponding class II multiplier z′≡−z identically. The converse will be obvious. 
       BRIEF SUMMARY OF THE INVENTION 
       [0023]    The aim of the present invention is to provide a method to generate uniform and independent random numbers with long periods and certified statistical quality that may be realized on computers and in their operating systems with the smallest computational cost. 
         [0024]    The invention claims a method of obtaining uniform and independent random numbers comprising
       1. two odd primes p 1  and p 2  that respectively give an odd integer q 1 :=(p 1 −1)/2 and an even integer q 2 :=(p 2 −1)/2 where q 1  and q 2  are coprime,   2. an integer y 1  with the order ord(y 1 ) q 1  mod (p 1 ) and a primitive root z 2  of p 2 ,   3. the modulus d=p 1 p 2 ,   4. the multiplier z coprime with d=p 1 p 2 , and determined modulo d uniquely by congruence relations z≡y 1  mod (p 1 ), z≡z 2  mod (p 2 ), and   5. an arbitrary integer n, coprime with d and called initial value or seed.
 
Said method constructs cyclic or coset sequence of integers for the seed n with the generator z,
       
 
         [0000]      { r   j   ≡nz   j  mod( d )|1≦ j≦T= 2 q   1   q   2 },
 
         [0000]    by solving recursively the congruence relation 
         [0000]        r   1   ≡n  mod( d ),  r   j+1   ≡zr   j  mod( d ), 0&lt; r   j   &lt;d,  1≦ j≦T= 2 q   1   q   2 ,
 
         [0000]    and gives the output sequence {v 1 , v 2 , . . . , v T } for uniform and independent random numbers of period T by realizing the arithmetic, 
         [0000]        v   j   r   j   /d,  0&lt; v   j &lt;1, 1≦ j≦T.  
 
         [0030]    The heart of the invention is the same as patent application Ser. No. 12/379,964 in selecting said odd primes p 1 ,p 2  that give an odd integer q 1 =(p 1 −1)/2 and an even integer q 2 =(p 2 −1)/2 where q 1  and q 2  are coprime, but differs in constructing the multiplier z with a non-primitive integer y 1  with ord(y 1 )=q 1  mod (p 1 ). 
         [0031]    Merits obtained by this new method are:
       a. the period T=2q 1 q 2  of the random number sequence obtained is identical with the longest possible results of patent application Ser. No. 12/379,964,   b. the cyclic sequence generated by this multiplier z is again devoid of −1, enabling the use of the whole period T=2q 1 q 2  for independent random numbers, and   c. the multiplier z thus constructed needs no new spectral tests of its own, as results may be read out from those of tests of patent application Ser. No. 12/379,964 performed on class I multipliers constructed solely with primitive roots.       
 
     
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0035]    The present invention aims to realize designs of generators for uniform and independent random numbers on computers with sufficiently long periods. The invention applies the multiplicative congruential method with moduluses formed by products of two large odd primes, and gives the largest conceivable extension of the method of patent application Ser. No. 12/379,964 with the same facilities for the design of output performances. 
         [0036]    As usual with multiplicative congruential methods the preparation of the initial value or seed n should be left to users. The principle is to choose n so as to be coprime with the modulus d=p 1 p 2  formed by two distinct primes p 1 ,p 2 . The matter may be simplified for users by asking them to choose two integers n 1 ,n 2  satisfying 0&lt;n 1 &lt;p 1  and 0&lt;n 2 &lt;p 2 . Programs for random number generation will readily solve congruence relations 
         [0000]        n≡n   1  mod( p   1 ),  n≡n   2  mod( p   2 ), 
         [0000]    and provide the seed n to start the program. 
         [0037]    The greatest merit of the composite modulus d=p 1 p 2  formed by two odd primes arises with spectral tests. Take the Mersenne prime modulus d=p=2 31 −1 adopted by Fishman and Moore in 1986 in their monumental work. This modulus is certainly too small for simulations of today. Yet, it still typifies fundamental aspects of problems and guides us with the clear overview. Fishman and Moore set the criterion that the passable performance should be less than 1.25. First of all, experiments (say, performed on our small computers of today at least to some partial extent) will readily convince us that this criterion 1.25 is an invaluable finding of Fishman and Moore. Second, experiments will also convince us that exhaustive spectral tests, sweeping over all primitive roots as initiated by Fishman and Moore (1986) on this modulus, are inevitable in finding good primitive roots. The statement is all true with moduluses and multipliers of the present invention. Third, experiments will show that the computing time of 2nd to 6th sweeping spectral tests increases very rapidly with the magnitude of the modulus. Compared to the complete set of 2nd-6th spectral tests of a single primitive root, tests sweeping all primitive roots for the modulus d=2 31 −1 take about 4×10 4  or more of computing time. The reduction of the difficulty enabled by adopting two primes p 1 ,p 2  of the order of magnitudes of d 1/2  is magnificent, as to be reported.
       G. S. Fishman and L. R. Moore: “An exhaustive analysis of multiplicative congruential random number generators with modulus 2 31 −1.” SIAM Journal on Scientific and Statistical Computing Vol. 7 (1986), pp. 24-45.       
 
         [0039]    As regards the quality of combined multipliers, experiments suggest that the performance of the multiplier z corresponding to ±(z 1 ,z 2 ) may be expected to be no worse than the product of respective performances of z 1  and z 2 . Thus, if z 1  and z 2  are chosen with the performances smaller than 1.25, i.e. if z 1 , z 2  both construct lattices that are respectively within 125% departure from their geometrically ideal configurations, then we may expect the departure of the lattice formed by z within 1.25 2 ≈1.50 or 150% from its geometrical ideal, at least for some, but of course not all, pair ±(z 1 , z 2 ) of multipliers. This result might seem not so good as best primitive root multipliers for a prime modulus. Imagine, however, the case d≈10 22 ≈2 73 . The selection of good multipliers by exhaustive tests for this magnitude of a prime modulus d=p will not yet be possible; we lack means to find good primitive roots for p. But exhaustive tests on primes with the order of magnitude of 2 37  will now be possible, and we may think of tests of combinations of selected primitive roots in the composite modulus d=p 1 p 2 ≈2 74 . The noted experience will also help us to adopt the computing scheme that discards those pairs with performances not less than 1.50, say; then the speed of computation will be remarkably increased in sweeping all selected combinations. Since the obtained uniform and independent random numbers have a very large precision, of the order of d −1≈2   −74 , and are to be substituted into real double precision variables with its recognizable smallest units of about 2 −53 , each of the noted units contains approximately 2 21  random numbers in a period. Besides, the performance of 1.50 to be assured in all 2 to 6 dimensional distribution might be said satisfactory, in particular in circumstances where bad performances such as 7 or even 20 are not rare to arise. See, however, discussions to follow. This exposition will also indicate that composite multipliers formed with three or more primitive roots will not be adequate as design. 
         [0040]    Some accounts on geometrical aspects related to spectral tests will be in order at this end. Let E s  denote the s dimensional Euclidean space. Spectral tests are based on the following fact. Take a consecutive s-tuple of the cyclic sequence, or more generally of the coset sequence as a point in E s  with coordinates 
         [0000]      ( nz   j   nz   j+1   , . . . , nz   j+s−1 )≡nz j (1, z, . . . , z   s−1 ).
 
         [0000]    These coordinates and their equivalents modulo d are notably linear combinations of the following with integer coefficients: 
         [0000]    
       
         
           
             
               e 
               1 
             
             = 
             
               ( 
               
                 1 
                 , 
                 z 
                 , 
                 
                   z 
                   2 
                 
                 , 
                 ⋯ 
                  
                 
                     
                 
                 , 
                 
                   z 
                   
                     s 
                     - 
                     2 
                   
                 
                 , 
                 
                   z 
                   
                     s 
                     - 
                     1 
                   
                 
               
               ) 
             
           
         
       
       
         
           
             
               e 
               2 
             
             = 
             
               ( 
               
                 0 
                 , 
                 d 
                 , 
                 0 
                 , 
                 ⋯ 
                  
                 
                     
                 
                 , 
                 0 
                 , 
                 0 
               
               ) 
             
           
         
       
       
         
           
             
               e 
               3 
             
             = 
             
               ( 
               
                 0 
                 , 
                 0 
                 , 
                 d 
                 , 
                 ⋯ 
                  
                 
                     
                 
                 , 
                 0 
                 , 
                 0 
               
               ) 
             
           
         
       
       
         
           … 
         
       
       
         
           
             
               e 
               
                 s 
                 - 
                 1 
               
             
             = 
             
               ( 
               
                 0 
                 , 
                 0 
                 , 
                 0 
                 , 
                 ⋯ 
                  
                 
                     
                 
                 , 
                 d 
                 , 
                 0 
               
               ) 
             
           
         
       
       
         
           
             
               e 
               s 
             
             = 
             
               ( 
               
                 0 
                 , 
                 0 
                 , 
                 0 
                 , 
                 ⋯ 
                  
                 
                     
                 
                 , 
                 0 
                 , 
                 d 
               
               ) 
             
           
         
       
     
         [0000]    Certainly, nz j e 1  gives the noted s-tuple of the coset sequence with an integer nz j , and d translations along 2nd, 3rd, . . . , and sth coordinate axes are realized by adding suitable linear combinations of e 2 , e 3 , . . . , e s  with integer coefficients. As to the 1st axis, integer multiples of the following suffice to give any d translations: 
         [0000]      de 1   ze   2   −z   2   e   3   − . . . −z   s−l   e   s =( d, 0,0, . . . , 0). 
         [0000]    These structures are stated that points of consecutive s-tuples of the cyclic or coset sequences are in the lattice spanned by {e 1 , e 2 , . . . , e s } of E s . Consider the hypercube C d  of sides [0, d) located at the origin of E s  and ask how many lattice points are in the hypercube C d . The answer comes from the coordinates of je 1  with an integer j. Its first coordinate j can give d non-equivalent values 0, 1, . . . , d−1 in the hypercube C d . All other coordinates are retracted back to give respectively unique values in C s  by adding a suitable linear combination of {e 2 , e 3 , . . . , e s } with integer coefficients. Thus, the noted lattice has d distinct points in C d . Similar constructions prove that any hypercube of sides d issuing from (k 1 d, k 2 d, . . . , k s d) with integers {k 1 , k 2 , . . . , k s } contains d lattice points. Spectral tests of s-dimension evaluate the geometrical distribution of these d points in C d . A valuation closer to its lower limit 1 indicates that d lattice points are nearer to the geometrically ideal packing in E s ; lattice points are then distributed in more homogeneous and isotropic manner, suggesting that consecutive s random numbers (which have coordinates of coset sequences divided by d and should be considered in the unit hypercube of E s ) will have better distribution in view of the aimed independence and uniformity. We said suggesting, because random numbers of a primitive root multiplier for a prime modulus, of patent application Ser. No. 12/379,964 or of the present invention occupy about only half of these lattice points in their periods, and we are merely hoping that they appear to choose their seats randomly and in an unpredictable sequential manner. This is a point to be supplemented by statistical tests as performed in the far-reaching work of Fishman and Moore (1986), but their conclusions suggest that good performances in spectral tests will imply little problematic behavior in statistical tests. 
         [0041]    We should close descriptions of the present invention with comments on a problem that still remain dim. Consider the 2 dimensional Euclidean space E 2  and its unit square with sides of length 1. Take a simple image of the double precision real numbers in the sense of fixed point, with the smallest unit, say 2 −53 . The unit square is then divided into small cells (call them microcells) which are totally (2 53 ) 2 =2 106  in number. If the modulus is chosen d≈2 74  for the multiplicative congruence random number sequence, then said lattice for s=2 has only d≈2 74  lattice points in the unit square, which are very small compared to the number of microcells of double precision. More generally in the s-dimensional space, the unit hypercube contains 2 53s  microcells, but the noted multiplicative congruential sequence of random numbers can be distributed only on the half of lattice points, and the number of lattice points is fixed to d≈2 74  irrespective of the dimension s. We should stress that this is not a problem to be overcome by increasing the period of random numbers. However large this period may be chosen, properties of the random number sequence should be considered within the upper limit T of numbers usable in a simulation, and the heart of the problem is what kind of statistical properties this length T sequence would show as regards uniformity and independence. Our simulations might well be taken to use T≈2 74  or so of them, and the problem is the distribution of this amount of random numbers. The present invention and patent application Ser. No. 12/379,964 ensure that their output sequences give this order of magnitude of lattice points (seats) in the unit hypercube in E s  and they may be tested of homogeneity and isotropy of their distribution. If this distribution of seats are nearly homogeneous and isotropic, then consecutive s-tuples of random number outputs for length T will have less reasons to be denied statistically of their uniform and independent distribution. It should of course be questioned as other problems of statistics whether or not the output s-tuples of truly uniform and independent random numbers can plausibly be on such homogeneous and isotropic distribution of seats in this period T≈2 73 , or whether the particular order of appearance of random numbers generated by the proposed invention on these seats gives the disguise of uniform and independent distribution. Inventors feel that we cannot resort to an optimism, without tests, of expecting a random number sequence, say with its gigantic period &gt;&gt;T and theoretical assurance of beautiful equidistribution in its one period, to be able to have its (negligible) portion of this length T≈2 74  retaining the literal equidistribution. Experiences of sweeping spectral tests motivate us strongly to choose the security and the clarity ensured by them. Yet, questions will remain to be analyzed and tested in the future.