Opened 11 years ago

Closed 10 years ago

#6801 closed Bugs (fixed)

mersenne_twister friend function operator==

Reported by: James Hirschorn <james.hirschorn@…> Owned by: No-Maintainer
Milestone: To Be Determined Component: random
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

operator== does not return the correct value.

I give an example of 2 equivalent mersenne_twister engines for which operator== returns a value of false.

The problem is that operator== counts the high w-r bits of the first byte of the generator state.

Attachments (1)

mersenne_twister_bug.cpp (1.1 KB ) - added by James Hirschorn <james.hirschorn@…> 11 years ago.
example source code

Download all attachments as: .zip

Change History (2)

by James Hirschorn <james.hirschorn@…>, 11 years ago

Attachment: mersenne_twister_bug.cpp added

example source code

comment:1 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

(In [81001]) Make sure that equivalent states of mersenne_twister have identical bits. Fixes #6801.

Note: See TracTickets for help on using tickets.