I need a "random" number generator that gives the same result for a given seed on Windows, Mac, Linux, iOS, and Android. Now I've tried std::rand, and boost::random_int_generatorwith the help boost::mt19937, but unfortunately, the result is different from Windows and Mac.
Does anyone know of an implementation (C ++) that works reliably on all platforms?
EDIT 1:
To be more specific, the difference between the numbers from boost::mt19937Windows and Mac shows that Windows has (2) additional blocks of numbers generated. This looks really weird because most of the numbers are the same, since these blocks are only present on Windows.
EDIT 2:
boost::mt19937It works reliably on all platforms. Our problems were not a mistake.
source
share