Notes on computational physics lecture

1 – In congruent methods for generating random number, when you use time of computer for initial condition, it supposed to every run of program take at least 1 second, and therefore initial condition will be different. But it seems that this is not happen always. For a better method you can use index of initial condition additionally, i.e. instead of “x(0)=time()”, use “x(0)=time()+i”, where i is index of initial condition for generating ith random number.