Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#387 closed Bugs (None)

MT seed algorithm needs fix applied

Reported by: oblomovska Owned by: jmaurer
Milestone: Component: random
Version: None Severity:
Keywords: Cc:

Description

The version of Mersenne twister in Boost 1.32 is a
reimplementation of the original MT code. That version
turned out to have a bug in its seeding algorithm. A
description of the bug as well as fixed c
implementations can be found at:

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html

See also:
 http://lists.boost.org/MailArchives/boost/msg78304.php
for a proposed fix to boost::random.

Change History (3)

comment:1 by jmaurer, 18 years ago

Logged In: YES 
user_id=53943

Thank you for the information. As has been pointed out in
the e-mail thread linked to above, the boost.random library
is now actually part of the C++ library TR, and changing the
default constructor or zero-argument seed function is no
longer feasible: People expect source-code compatibility.
The proper way is to add an additional, overloaded seed()
function that has the new semantics.

comment:2 by oblomovska, 18 years ago

Status: assignedclosed
Logged In: YES 
user_id=1243837

Thanks for the information. We have already done as you
suggested, I was hoping we could delete that code from our
systems with the next boost release.

I am completely unaware of what the C++ library TR is, and
this is probably the wrong platform for a discussion, but
FYI: we use random numbers for Monte Carlo simulations, and
for us, the bug a quite a serious one. I think a warning in
the documentation would be appropriate.

boost.random is great work, by the way. Thanks!

comment:3 by jmaurer, 18 years ago

Logged In: YES 
user_id=53943

The C++ library TR is a technical report that the C++
standardization committee is currently working on.

I understand the seriousness of the issue, and I will
provide wording to the standardization committee to fix the
issue.
Note: See TracTickets for help on using tickets.