Consider a generic rand(...) function in, e.g., Python or MatLab, etc.
We need to seed it with an integer, this can be helpful for reproducing results.
I remember a while ago I took a class on seeding random number generators and I believe I remember that seeding with the integer "0" although tempting is not a good idea but that you want to get as close to a prime as possible or something.
Now of course I forgot why (or if that was indeed what was said) it is not an excellent idea to use 0.
Question I am currently writing a program which does rely on a good random sequence (how random these sequences ever get is a whole different topic), so just in case someone knows/have heard of this "seeding with 0 issue" I would love to hear an answer/comment, is it language dependent maybe?
Thanks guys
Aucun commentaire:
Enregistrer un commentaire