http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55215



             Bug #: 55215

           Summary: Constructor seeding is broken for Mersenne twister

    Classification: Unclassified

           Product: gcc

           Version: 4.6.4

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: libstdc++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: w...@beyondunreal.com





http://ideone.com/p8B7lF (the code is also provided in attachment).



I expected that both functions, f and g, would return the same value every

time. But, as we can see, initializing Mersenne using its constructor doesn't

yield consistent results.



I tested compiler from Visual Studio 2012, and it doesn't have this bug. Other

random number engines probably don't have this bug (I tested std::minstd_rand).

Reply via email to