I was just wondering if the rand
(http://ift.tt/1BGCU4E) function will generate the same sequence of random numbers, while using the same seed, but when run on different libc
implementations, and even different compilers and operating systems (win, linux).
I did some tests using various compilers( g++4.8, g++5.1 and clang) and it seems that the answer is yes, however I did not find any "official" mention of the PRNG algorithm used in the C's random number generation (http://ift.tt/1WKiOSV), or whether these should be mentioned in the standards ...
Aucun commentaire:
Enregistrer un commentaire