Title
[tr1] Random Number Requirements in TR1
Status
nad
Section
[tr.rand.eng.disc][tr.rand.eng.xor]
Submitter
John Maddock

Created on 2008-01-15.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

NAD Recommended.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

Move to NAD as recommended.

Date: 2010-10-21.18:28:33

[ Post Summit Daniel adds: ]

Recommend NAD: xor_combine does no longer exist and discard_block[_engine] has now the required seed overload accepting a result_type, which shall be an unsigned integral type.

Date: 2010-10-21.18:28:33

[ Jens adds: ]

Both engines do have the necessary constructor, therefore the omission of the seed() member functions appears to be an oversight.

Date: 2008-01-15.00:00:00

Table 16 of TR1 requires that all Pseudo Random Number generators have a

seed(integer-type s)

member function that is equivalent to:

mygen = Generator(s)

But the generators xor_combine and discard_block have no such seed member, only the

template <class Gen>
seed(Gen&);

member, which will not accept an integer literal as an argument: something that appears to violate the intent of Table 16.

So... is this a bug in TR1?

This is a real issue BTW, since the Boost implementation does adhere to the requirements of Table 16, while at least one commercial implementation does not and follows a strict adherence to sections 5.1.4.5 and 5.1.4.6 instead.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3769
2010-10-21 18:28:33adminsetmessages: + msg3768
2010-10-21 18:28:33adminsetmessages: + msg3767
2010-10-21 18:28:33adminsetmessages: + msg3766
2008-01-15 00:00:00admincreate