From 36ac3ed6b75d80704a706dbd2f9f33594d657af7 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 5 Jun 2006 21:23:59 +0000 Subject: random (mersenne_twister<>::seed()): Fix per tr1/5.1.4.2, p8. 2006-06-05 Paolo Carlini * include/tr1/random (mersenne_twister<>::seed()): Fix per tr1/5.1.4.2, p8. * include/tr1/random.tcc (mod_w): Add. (mersenne_twister<>::seed(unsigned long)): Fix per tr1/5.1.4.2, p9. (mersenne_twister<>::seed(Gen&, false_type)): Adjust to use mod_w. * testsuite/tr1/5_numerical_facilies/random/mt19937.cc: Fix expected result per tr1/5.1.5, p2. * testsuite/tr1/5_numerical_facilies/random/mersenne_twister/ cons/default.cc: Adjust. * include/tr1/random (exponential_distribution<>::operator()()): Fix. From-SVN: r114412 --- .../tr1/5_numerical_facilies/random/mersenne_twister/cons/default.cc | 2 +- libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mt19937.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libstdc++-v3/testsuite') diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mersenne_twister/cons/default.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mersenne_twister/cons/default.cc index 9a17e16..459bb47 100644 --- a/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mersenne_twister/cons/default.cc +++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mersenne_twister/cons/default.cc @@ -38,7 +38,7 @@ test01() VERIFY( x.min() == 0 ); VERIFY( x.max() == 4294967295ul ); - VERIFY( x() == 4290933890ul ); + VERIFY( x() == 3499211612ul ); } int main() diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mt19937.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mt19937.cc index 0b89e8b4..a3ddb3d 100644 --- a/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mt19937.cc +++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilies/random/mt19937.cc @@ -33,7 +33,7 @@ test01() for (int i = 0; i < 9999; ++i) a(); - VERIFY( a() == 3346425566ul ); + VERIFY( a() == 4123659995ul ); } int main() -- cgit v1.1