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/rand.eng.mers
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
..
assign.pass.cpp Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080 7 years ago
copy.pass.cpp Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080 7 years ago
ctor_result_type.pass.cpp Move test into test/std subdirectory. 10 years ago
ctor_sseq.pass.cpp Move test into test/std subdirectory. 10 years ago
ctor_sseq_all_zero.pass.cpp [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback 6 years ago
default.pass.cpp Move test into test/std subdirectory. 10 years ago
discard.pass.cpp Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080 7 years ago
eval.pass.cpp Move test into test/std subdirectory. 10 years ago
io.pass.cpp Move test into test/std subdirectory. 10 years ago
result_type.pass.cpp Move test into test/std subdirectory. 10 years ago
seed_result_type.pass.cpp Move test into test/std subdirectory. 10 years ago
seed_sseq.pass.cpp Move test into test/std subdirectory. 10 years ago
values.pass.cpp [libcxx] [test] Rename _Tp to T. NFCI. 7 years ago