llvm-project/libcxx/test/std/numerics
Hubert Tong 2c0fad59df [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

llvm-svn: 339969
2018-08-16 23:56:54 +00:00
..
c.math Fix return type of isinf(double) and isnan(double) where possible. 2018-05-01 03:05:40 +00:00
cfenv/cfenv.syn Move remaining _LIBCPP_VERSION tests into test/libcxx 2016-06-22 02:23:22 +00:00
complex.number [libcxx] Improve accuracy of complex asinh and acosh 2018-02-19 15:41:36 +00:00
numarray [libcxx] Avoid spurious construction of valarray elements 2018-02-08 11:33:48 +00:00
numeric.ops [libcxx] [test] Fix MSVC warnings and errors. 2018-02-26 20:47:46 +00:00
numeric.requirements
numerics.general
rand [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback 2018-08-16 23:56:54 +00:00
nothing_to_do.pass.cpp