You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/numerics/rand/rand.eng
Hubert Tong aec9e0e5a2 [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback
Summary:
When a seed sequence would lead to having no non-zero significant bits
in the initial state of a `mersenne_twister_engine`, the fallback is to
flip the most significant bit of the first value that appears in the
textual representation of the initial state.

rand.eng.mers describes this as setting the value to be 2 to the power
of one less than w; the previous value encoded in the implementation,
namely one less than "2 to the power of w", is replaced by the correct
value in this patch.

Reviewers: mclow.lists, EricWF, jasonliu

Reviewed By: mclow.lists

Subscribers: mclow.lists, jasonliu, EricWF, christof, ldionne, cfe-commits

Differential Revision: https://reviews.llvm.org/D50736


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339969 91177308-0d34-0410-b5e6-96231b3b80d8
6 years ago
..
rand.eng.lcong [libcxx] [test] Remove unused local typedef in test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp 7 years ago
rand.eng.mers [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback 6 years ago
rand.eng.sub Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080 7 years ago
nothing_to_do.pass.cpp Move test into test/std subdirectory. 10 years ago