Closed iboB closed 9 years ago
Should they be the same across platforms? What is the relevant spec?
From http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3551.pdf
For knowledgable users, the library provides nine additional aliases for pre-configured engine types of known good quality.12 These types span a wide spectrum of trade-offs in performance and size. Among other characteristics, the C++11 standard requires that these engines produce bit-for-bit identical results across implementations
Also, I just tested this and I get the exact same values as the ones on Windows msvc and Linux gcc, on Mac OS X with clang 3.6.0 (Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
), so it doesn't seem to be a libc++ problem
Well, I cannot reproduce this 1.34.6. I could in 1.34.1. I have no Idea what might have caused this...
It's possible a libc update since 1.34.1 made a difference.
Simple repro case:
I get the same numbers on Windows with msvc12 and Linux with gcc 4.9.2 but different ones in the browser with Emscripten.
Only the Mersenne Twister engine seems to produce the same numbers on all platforms.
edit: In case it's not clear. I do get the same numbers on different runs in the browser. The seed works. What I don't get are the same numbers across all platforms.