output - Saving the current seed in a Fortran random number sequence -


i using intrinsic function rand() generate random numbers. initialized sequence defined seed, want able output current seed rand() using @ point in loop.

by doing this, should able "continue" sequence of random numbers in new program.

from have seen online, there no way random number generator associated rand() , srand() functions. true? can suggest different method (perhaps, random_number()?).

rand , srand not standard fortran functions. expect compiler documentation can tell how best use them. fortran standard defines subroutine random_seed 3 optional arguments (named save, put , get). put , get setting , getting random seed. save can used return size of integer array used hold seed prng. generator can called standard routine random_number.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -