This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41019] Variate_generator with mt19937 and normal_distribution produces wrong sequence for "-O3".
- From: "m_albert137 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2009 21:02:18 -0000
- Subject: [Bug c++/41019] Variate_generator with mt19937 and normal_distribution produces wrong sequence for "-O3".
- References: <bug-41019-13452@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from m_albert137 at yahoo dot com 2009-08-09 21:02 -------
Created an attachment (id=18332)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18332&action=view)
Example code
When compiled below -O3 (e.g., -O2), this code gives:
0 -0.29321891723895837645
1 0.25316081895796688217
2 -0.057085487765685671846
with -O3:
0 0.31678484080597951733
1 0.27675012391718101235
2 0.14034606328371523887
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41019