9 May 2025 9:00:47.527 PM f90_random_test(): Fortran90 version. Test random_number(), which generates random values. TEST01: To generate 10 random real numbers, you could call random_number ( X )... 10 times, with a scalar X: 0.957610369 0.690401614 0.728577137 0.520510852 0.940167606 0.701054156 0.696892500 0.757944703 0.859476864 0.758120537 5 times with a vector X of length 2: 0.350202382 2.44565010E-02 0.308161616 0.651974797 0.879318535 0.644591272 0.480502367 0.958378494 0.923992217 7.74692297E-02 or once with a 5 by 2 X array: 1.50601864E-02 0.741172075 3.97461057E-02 0.402493656 0.932148039 0.837213516 0.658467770 0.939082205 0.881083190 0.451314270 TEST02: To generate 10 random double precision numbers, you could call random_number ( X )... 10 times, with a scalar X: 0.58748154967246691 0.99488405039475791 8.3512785980051740E-002 0.99465507826241217 0.85963425293705831 0.44402398367493479 0.66039922462643608 0.83800970936071306 0.92075664080289643 0.99531423246936535 5 times with a vector X of length 2: 0.88369770858451802 0.28426348410075319 0.85101865706940860 6.9563111938535482E-002 0.94143982151932981 0.55144701751999003 0.62668504378518952 0.45067569856929079 7.7124001961017430E-002 0.10466026338573808 or once with a 5 by 2 X array: 0.86200298259887043 0.51052094510134971 0.28222723964802632 0.17676093804318294 0.81322547166436343 0.80862536811385444 0.37848202127126940 0.58531632086585950 0.84362967412395307 0.93236643785515583 TEST03: To generate 10 random complex numbers, you must request real and imaginary parts separately. You could call RANDOM_NUMBER ( X )... 10 times, with a scalar X: (0.465762913,0.802047491) (0.242566228,0.435026228) (0.691592991,0.187998652) (0.439731181,0.288018405) (0.301821589,0.807162166) (0.813600481,0.377219975) (0.356674790,5.051898956E-02) (0.128561914,0.453147233) (0.925485551,0.282522440) (0.401532292,0.539362013) 5 times with a vector X of length 2: (8.920639753E-02,0.626257896) (0.123452663,0.761187136) (0.343067527,0.626133680) (9.903436899E-02,0.370592415) (0.883160233,0.231436014) (0.790767491,0.293745279) (0.221744001,0.612737596) (0.353613198,0.760828495) (0.477529407,8.768194914E-02) (0.579989612,0.999475181) or once with a 5 by 2 X array: (0.135185122,0.994137526) (0.153123736,0.272449315) (8.892357349E-02,0.116504967) (0.916703403,0.685890615) (0.822640598,0.243563354) (0.291273475,0.628601968) (0.440412700,4.978251457E-02) (0.718677998,0.307616413) (0.972706974,0.709582269) (0.501622677,0.367547393) TEST05: random_seed() restarts 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 = 8 The current seed is 23477817 1610745558 1036091624 -1327631822 2095731889 509637399 858717317 826458071 We're going to save this seed and reuse it. 10 times, with a scalar X: 0.14727 0.37253 0.65986 0.66835 0.49498 0.94187 0.25372 0.79271 0.52661 0.65982 The current seed is -1412124052 36594367 -47815919 1951575123 -274143927 823676262 623589276 1399739918 We reset the seed to 23477817 1610745558 1036091624 -1327631822 2095731889 509637399 858717317 826458071 five times with a vector X of length 2: 0.14727 0.37253 0.65986 0.66835 0.49498 0.94187 0.25372 0.79271 0.52661 0.65982 The current seed is -1412124052 36594367 -47815919 1951575123 -274143927 823676262 623589276 1399739918 We reset the seed to 23477817 1610745558 1036091624 -1327631822 2095731889 509637399 858717317 826458071 or once with a 5 by 2 X array: 0.14727 0.94187 0.37253 0.25372 0.65986 0.79271 0.66835 0.52661 0.49498 0.65982 The current seed is -1412124052 36594367 -47815919 1951575123 -274143927 823676262 623589276 1399739918 f90_random_test(): Normal end of execution. 9 May 2025 9:00:47.527 PM