public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/55215] New: Constructor seeding is broken for Mersenne twister
@ 2012-11-05 16:14 wgh at beyondunreal dot com
  2012-11-05 16:15 ` [Bug libstdc++/55215] " wgh at beyondunreal dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: wgh at beyondunreal dot com @ 2012-11-05 16:14 UTC (permalink / raw)
  To: gcc-bugs


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: unassigned@gcc.gnu.org
        ReportedBy: wgh@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).


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-05 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-05 16:14 [Bug libstdc++/55215] New: Constructor seeding is broken for Mersenne twister wgh at beyondunreal dot com
2012-11-05 16:15 ` [Bug libstdc++/55215] " wgh at beyondunreal dot com
2012-11-05 17:44 ` paolo.carlini at oracle dot com
2012-11-05 19:25 ` paolo at gcc dot gnu.org
2012-11-05 20:12 ` paolo.carlini at oracle dot com
2012-11-05 20:12 ` paolo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).