This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51795] linear_congruential_engine doesn't work correctly
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jan 2012 12:47:10 +0000
- Subject: [Bug libstdc++/51795] linear_congruential_engine doesn't work correctly
- Auto-submitted: auto-generated
- References: <bug-51795-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51795
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-27 12:47:10 UTC ---
Eg:
Index: random.h
===================================================================
--- random.h (revision 183615)
+++ random.h (working copy)
@@ -263,7 +263,7 @@
result_type
operator()()
{
- _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
+ _M_x = (__a * _M_x + __c) % __m;
return _M_x;
}