Pergerine
03-27-2011, 03:21 AM
hi
im using ran2 as my RNG. im initializing my "seed" as any arbitrary negative value and then running a loop to get 10 random numbers.
i did not change the value of "seed" after the initializing. my problem is that even though the book says the random numbers should be generated between 0.0 and 1.0 im getting the values to be of the order 10^9.
Furthermore while these numbers are random they cease to be random after the 5th iteration of the loop and im getting a constant value of "-419434".
Can anyone tell me whats going on?:confused:
im using ran2 as my RNG. im initializing my "seed" as any arbitrary negative value and then running a loop to get 10 random numbers.
i did not change the value of "seed" after the initializing. my problem is that even though the book says the random numbers should be generated between 0.0 and 1.0 im getting the values to be of the order 10^9.
Furthermore while these numbers are random they cease to be random after the 5th iteration of the loop and im getting a constant value of "-419434".
Can anyone tell me whats going on?:confused: