6 October 2025 6:06:03.156 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.240944505 0.246219873 0.211813807 0.766440749 0.863811791 0.795810819 0.805093408 0.522385180 1.52220130E-02 0.627437353 5 times with a vector X of length 2: 0.475408852 0.509395897 0.594633937 0.318781137 0.943729997 0.596849740 0.398030877 0.867019117 0.847266793 0.466194272 or once with a 5 by 2 X array: 0.111413240 6.86963797E-02 9.10473466E-02 0.231242836 0.835936189 0.902433753 0.400351584 0.262774408 9.95638371E-02 0.613540232 TEST02: To generate 10 random double precision numbers, you could call random_number ( X )... 10 times, with a scalar X: 0.56427341240665463 0.51165902895790949 0.50579806041047781 0.33294953277480788 0.24568550837429737 0.93857667105142317 0.46134856927543055 0.32314354278100910 0.57448523816905606 0.52174399823564932 5 times with a vector X of length 2: 0.38977693892389786 0.33679371994227725 0.55834285643295878 0.80290976814217241 0.74868618336928183 0.32401298505361542 0.31400556676904323 0.14810644238117199 0.38554614294606682 0.76020175859267403 or once with a 5 by 2 X array: 0.43544515349301516 0.51014999783610904 0.33955045481893065 0.76065093174745502 0.67549994867186181 0.14245140428484104 9.3788934185116801E-002 0.46921257743927225 0.72174959491137436 0.17315698307638561 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.251998901,0.666800857) (0.924396396,4.889684916E-02) (0.707417071,0.411896706) (0.444293141,0.519839644) (0.395627916,0.250008345) (0.237256289,0.289843857) (0.162322342,0.862120271) (0.392003059,2.234899998E-02) (0.744265497,7.581698895E-02) (0.278097749,0.550613344) 5 times with a vector X of length 2: (0.209707975,0.608888507) (0.541289926,0.607605696) (0.176608622,0.619048119) (0.104900479,0.169847608) (0.395974457,0.476184309) (0.585520208,0.206700325) (0.208845079,0.493064880) (0.223361015,0.459353268) (0.518888593,0.295062900) (0.107721567,0.149587214) or once with a 5 by 2 X array: (0.974509060,0.603624701) (0.783664227,0.365525067) (0.523587942,0.379068792) (0.925638139,6.482976675E-02) (0.780334711,0.277219832) (0.467294157,0.394891560) (0.151625812,1.203143597E-02) (0.831067741,0.394348145) (0.948691070,0.834653974) (0.562914014,0.779422641) 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 -1603653590 -1705234768 1169876075 -399199547 1555278402 -1639553112 570883643 1838985878 We're going to save this seed and reuse it. 10 times, with a scalar X: 0.61481 0.43585 0.20079 0.92855 0.37879 0.35062 0.42541 0.64585 0.85017 0.78459 The current seed is 1162177015 965776517 -1969043803 276989706 161860580 363078205 534530139 -841456044 We reset the seed to -1603653590 -1705234768 1169876075 -399199547 1555278402 -1639553112 570883643 1838985878 five times with a vector X of length 2: 0.61481 0.43585 0.20079 0.92855 0.37879 0.35062 0.42541 0.64585 0.85017 0.78459 The current seed is 1162177015 965776517 -1969043803 276989706 161860580 363078205 534530139 -841456044 We reset the seed to -1603653590 -1705234768 1169876075 -399199547 1555278402 -1639553112 570883643 1838985878 or once with a 5 by 2 X array: 0.61481 0.35062 0.43585 0.42541 0.20079 0.64585 0.92855 0.85017 0.37879 0.78459 The current seed is 1162177015 965776517 -1969043803 276989706 161860580 363078205 534530139 -841456044 f90_random_test(): Normal end of execution. 6 October 2025 6:06:03.156 PM