Middle Product Method random numbers is a method of NON-CONGRUENTIAL GENERATOR of random numbers,two seeds are multiplied, then the center is calculated,the center is reduced to 3 digits and that is the random number generated. the second seed then becomes the first seed and the center becomes the second seed.
the program must generate 100 random numbers, but because it does not make the correct calculations try to divide it so that it works well but miscalculates the numbers, only generated well until the 4th iteration.
Middle Product code java code
the program must generate the same values of the seeds and the numbers generated with excel. file excel
Aucun commentaire:
Enregistrer un commentaire