[random] Seeding again

6 Nov
2009
6 Nov
'09
5:05 a.m.
AMDG The attached patch allows random number generators to be seeded with any value. Currently linear_congruential and a few other generators can assert for some seeds. (For instance minstd_rand cannot be seeded with 0). For linear_congruential I am using the algorithm described in n2960, section 26.5.3.1/4. For linear_feedback_shift I use a similar idea, adding 2^(w-k) if the seed is less than 2^(w-k). The behavior of any code that was valid before, should be unaffected by this change. The patch includes test and documentation updates. The tests pass with gcc, msvc, and como. I think it's ready to go now. Okay to commit? In Christ, Steven Watanabe
5696
Age (days ago)
5696
Last active (days ago)
0 comments
1 participants
participants (1)
-
Steven Watanabe