Lord KJWilliams
Member
I need a second opinion about something I read....
I started getting into the idea of how many random numbers can be generated between 0 and 1 in a double variable in GML , so I googled it and found this article in stackoverflow.com ...
stackoverflow.com double numbers
..one of the people who responds to the op, states ( scroll down in the link to stackoverflow ):
...a random number generator generating numbers between 0.0 and 1.0 cannot in general produce all these numbers; typically it'll only produce numbers of the form n/2^53 with n an integer (see e.g. the Java documentation for nextDouble). So there are usually only around 2^53 (+/-1, depending on which endpoints are included) possible values for the random() output. This means that most doubles in [0.0, 1.0] will never be generated.
So in GML you can assign a number that can not be randomly generated in a double to a double variable, but you cant prove that it is one those numbers that can not be randomly generated between 0 and 1......since you will never see it produced by the random number generator.....
So the idea that I am understanding is, if your randomly generating numbers between 0 and 1, will you always get the same numbers values no matter how many times you run the program ( including the use of the randomize function ) in GML.....
Right???
Is this behavior true in GML even if you use the randomize function?
I started getting into the idea of how many random numbers can be generated between 0 and 1 in a double variable in GML , so I googled it and found this article in stackoverflow.com ...
stackoverflow.com double numbers
..one of the people who responds to the op, states ( scroll down in the link to stackoverflow ):
...a random number generator generating numbers between 0.0 and 1.0 cannot in general produce all these numbers; typically it'll only produce numbers of the form n/2^53 with n an integer (see e.g. the Java documentation for nextDouble). So there are usually only around 2^53 (+/-1, depending on which endpoints are included) possible values for the random() output. This means that most doubles in [0.0, 1.0] will never be generated.
So in GML you can assign a number that can not be randomly generated in a double to a double variable, but you cant prove that it is one those numbers that can not be randomly generated between 0 and 1......since you will never see it produced by the random number generator.....
So the idea that I am understanding is, if your randomly generating numbers between 0 and 1, will you always get the same numbers values no matter how many times you run the program ( including the use of the randomize function ) in GML.....
Right???
Is this behavior true in GML even if you use the randomize function?