[multiple changes]

2009-04-05  Edward M. Smith-Rowland  <3dw4rd@verizon.net>

	* include/bits/random.h (struct _ShiftMin1): Fix small typo and
	thinko.
	* testsuite/26_numerics/random/mersenne_twister_engine/cons/
	default.cc: Enable.

2009-04-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/39629 (partial)
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	base_move.cc: Use uint_fast64_t instead of unsigned long.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	seed1.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	seed2.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	base_copy.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	default.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/cons/
	seed_seq.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/
	requirements/typedefs.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/
	operators/equal.cc: Likewise.
	* testsuite/26_numerics/random/independent_bits_engine/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/mt19937_64.cc: Use ull.

From-SVN: r145553
This commit is contained in:
Paolo Carlini 2009-04-04 23:09:02 +00:00
parent cf7d2eb033
commit 42a733047e
13 changed files with 57 additions and 24 deletions

View File

@ -1,3 +1,33 @@
2009-04-05 Edward M. Smith-Rowland <3dw4rd@verizon.net>
* include/bits/random.h (struct _ShiftMin1): Fix small typo and
thinko.
* testsuite/26_numerics/random/mersenne_twister_engine/cons/
default.cc: Enable.
2009-04-05 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/39629 (partial)
* testsuite/26_numerics/random/independent_bits_engine/cons/
base_move.cc: Use uint_fast64_t instead of unsigned long.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed1.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed2.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
base_copy.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
default.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed_seq.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
requirements/typedefs.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
operators/equal.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/mt19937_64.cc: Use ull.
2009-04-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1_impl/random: Remove, empty.

View File

@ -78,14 +78,17 @@ namespace std
bool = __w <static_cast<size_t>
(std::numeric_limits<_UIntType>::digits)>
struct _ShiftMin1
{
{
static const _UIntType __value =
__gnu_cxx::__numeric_traits<_UIntType>::max;
__gnu_cxx::__numeric_traits<_UIntType>::__max;
};
template<typename _UIntType, size_t __w>
struct _ShiftMin1<_UIntType, __w, true>
{ static const _UIntType __value = _UIntType(1) << __w - _UIntType(1); };
{
static const _UIntType __value =
(_UIntType(1) << __w) - _UIntType(1);
};
template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool>
struct _Mod;

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -36,7 +36,7 @@ test01()
base_engine b;
std::independent_bits_engine<base_engine, 48, unsigned long> e(b);
std::independent_bits_engine<base_engine, 48, uint_fast64_t> e(b);
}
int main()

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -34,7 +34,7 @@ test01()
typedef std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
base_engine;
std::independent_bits_engine<base_engine, 48, unsigned long>
std::independent_bits_engine<base_engine, 48, uint_fast64_t>
e(std::move(base_engine()));
}

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -35,7 +35,7 @@ test01()
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
unsigned long
uint_fast64_t
> e;
}

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -37,7 +37,7 @@ test01()
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
unsigned long
uint_fast64_t
> e(seed);
}

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -37,7 +37,7 @@ test01()
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
unsigned long
uint_fast64_t
> e(seed);
}

View File

@ -2,7 +2,7 @@
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -37,7 +37,7 @@ test01()
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
unsigned long
uint_fast64_t
> e(seq);
}

View File

@ -2,7 +2,7 @@
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -33,7 +33,7 @@ test01()
std::independent_bits_engine
<std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48, unsigned long> u, v;
48, uint_fast64_t> u, v;
VERIFY( u == v );

View File

@ -2,7 +2,7 @@
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -35,7 +35,7 @@ test01()
std::stringstream str;
std::independent_bits_engine
<std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48, unsigned long> u, v;
48, uint_fast64_t> u, v;
u(); // advance
str << u;

View File

@ -3,7 +3,7 @@
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -35,7 +35,7 @@ test01()
<
uint_fast64_t, 48, 5, 12
>,
48, unsigned long
48, uint_fast64_t
> test_type;
typedef test_type::result_type result_type;

View File

@ -40,7 +40,7 @@ test01()
0xefc60000ul, 18, 1812433253ul> x;
VERIFY( x.min() == 0 );
// XXX VERIFY( x.max() == 4294967295ul);
VERIFY( x.max() == 4294967295ul );
VERIFY( x() == 3499211612ul );
}

View File

@ -2,7 +2,7 @@
//
// 2008-11-18 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
// Copyright (C) 2006, 2008 Free Software Foundation, Inc.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ -34,7 +34,7 @@ test01()
std::mt19937_64 a;
a.discard(9999);
VERIFY( a() == 9981545732273789042ul );
VERIFY( a() == 9981545732273789042ull );
}
int main()