May 8 2002 10:35:07.760 AM RANDOM_TEST A Fortran90 program to examine the F90 random number generation utilities. TEST01: To generate 10 random numbers, you could call RANDOM_NUMBER ( X )... 10 times, with a scalar X: 0.71769 0.65544 0.11524 0.44848 0.43446 0.60056 0.76504 0.24082 0.52424 0.29170 5 times with a vector X of length 2: 0.13133 0.09734 0.97478 0.43136 0.00138 0.52347 0.06943 0.00143 0.79398 0.83368 or once with a 5 by 2 X array: 0.72685 0.86577 0.67663 0.63038 0.95396 0.02892 0.73201 0.37587 0.94630 0.07839 TEST02: The RANDOM_SEED routine can be used to restart the random number generator. We will repeat the previous test, and manipulate the seed so that we compute the same 10 numbers each time. The size of the seed array is N = 64 The current seed is -1094874611 -1925457775 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 We're going to save this seed and reuse it. 10 times, with a scalar X: 0.48883 0.18950 0.51778 0.61086 0.72147 0.89901 0.96813 0.61414 0.11078 0.08420 The current seed is 361628724 2038802169 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 We reset the seed to -1094874611 -1925457775 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 five times with a vector X of length 2: 0.48883 0.18950 0.51778 0.61086 0.72147 0.89901 0.96813 0.61414 0.11078 0.08420 The current seed is 361628724 2038802169 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 We reset the seed to -1094874611 -1925457775 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 or once with a 5 by 2 X array: 0.48883 0.89901 0.18950 0.96813 0.51778 0.61414 0.61086 0.11078 0.72147 0.08420 The current seed is 361628724 2038802169 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RANDOM_TEST Normal end of execution.