gfortran - random number generator in fortran -
gfortran - random number generator in fortran - i testing rng code mentioned in link (fortran 77 code): https://www.cisl.ucar.edu/zine/96/spring/articles/3.random-6.html applies park & miller algorithm. the function phone call of programme is call srand(seed) x=rand() however programme not seem respond seeding srand(), i.e., x-value unaffected initial seeding, , equal ~0.218. suspect has definition of mutual block , info block, value of x equivalent putting seed 123456789, initialization value defined in datablock. any ideas? i compiling gfortran. ok, problem original srand , rand may called. renamed functions srand2 , rand2 , start work expected. for seed = 1 result 7.82636926e-06 , seed = 2 result 1.56527385e-05 . checked in gfortran , in intel's fortran. fortran gfortran prng fortran-common-block