Created on 2008-02-18.00:00:00 last changed 169 months ago
Rationale:
Addressed by N2836 "Wording Tweaks for Concept-enabled Random Number Generation in C++0X".
Proposed resolution:
Replace [rand.util.seedseq] paragraph 6 with:
Effects: Constructs a seed_seq object by effectively concatenating the low-order u bits of each of the elements of the supplied sequence [begin, end) in ascending order of significance to make a (possibly very large) unsigned binary number b having a total of n bits, and then carrying out the following algorithm:
for( v.clear(); n > 0; n -= 32 ) v.push_back(b mod 232), b /= 232;
[ post Bellevue: Bill provided wording. ]
This issue is made moot if 803 is accepted.
[ Bellevue: ]
Move to Open: Bill will try to propose a resolution by the next meeting.
The for-loop in the algorithm specification has n iterations, where n is defined to be end - begin, i.e. the number of supplied w-bit quantities. Previous versions of this algorithm and the general logic behind it suggest that this is an oversight and that in the context of the for-loop n should be the number of full 32-bit quantities in b (rounded upwards). If w is 64, the current algorithm throws away half of all bits in b. If w is 16, the current algorithm sets half of all elements in v to 0.
There are two more minor issues:
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-12-05 14:14:49 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg3818 |
2010-10-21 18:28:33 | admin | set | messages: + msg3817 |
2010-10-21 18:28:33 | admin | set | messages: + msg3816 |
2010-10-21 18:28:33 | admin | set | messages: + msg3815 |
2008-02-18 00:00:00 | admin | create |