Title
Problem in [rand.eng.mers]/6
Status
cd1
Section
[rand.eng.mers]
Submitter
Stephan Tolksdorf

Created on 2007-09-21.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

[ Sophia Antipolis: ]

Note the main part of the issue is resolved by N2424.

Date: 2010-10-21.18:28:33

[ Stephan Tolksdorf adds pre-Bellevue: ]

I support the proposed resolution in N2424, but there is a typo in the required behaviour for mt19937_64: It should be the 10000th (not 100000th) invocation whose value is given, and the value should be 9981545732273789042 (not 14002232017267485025). The change to para. 8 proposed by Charles Karney should also be included in the proposed wording.

Date: 2010-10-21.18:28:33

Proposed resolution:

See N2424 for the proposed resolution.

Date: 2010-10-21.18:28:33

[ Bellevue: ]

Stephan Tolksdorf has additional comments on N2424. He comments: "there is a typo in the required behaviour for mt19937_64: It should be the 10000th (not 100000th) invocation whose value is given, and the value should be 9981545732273789042 (not 14002232017267485025)." These values need checking.

Take the proposed recommendation in N2424 and move to REVIEW.

Date: 2007-09-21.00:00:00

The mersenne_twister_engine is required to use a seeding method that is given as an algorithm parameterized over the number of bits W. I doubt whether the given generalization of an algorithm that was originally developed only for unsigned 32-bit integers is appropriate for other bit widths. For instance, W could be theoretically 16 and UIntType a 16-bit integer, in which case the given multiplier would not fit into the UIntType. Moreover, T. Nishimura and M. Matsumoto have chosen a dif ferent multiplier for their 64 bit Mersenne Twister [reference].

I see two possible resolutions:

  1. Restrict the parameter W of the mersenne_twister_template to values of 32 or 64 and use the multiplier from [the above reference] for the 64-bit case (my preference)
  2. Interpret the state array for any W as a 32-bit array of appropriate length (and a specified byte order) and always employ the 32-bit algorithm for seeding

See N2424 for further discussion.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3574
2010-10-21 18:28:33adminsetmessages: + msg3573
2010-10-21 18:28:33adminsetmessages: + msg3572
2010-10-21 18:28:33adminsetmessages: + msg3571
2007-09-21 00:00:00admincreate