diff options
author | Paolo Carlini <pcarlini@suse.de> | 2006-07-14 17:21:03 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2006-07-14 17:21:03 +0000 |
commit | 8d6bd4a7917e33c6deabe809f98d31410c6848f9 (patch) | |
tree | abb1f84da3669eaccb99f0fbf2ed4906f26f7bb4 | |
parent | 38b19a9247234e6cfb54766cf21bfdb6a429fbb4 (diff) | |
download | gcc-8d6bd4a7917e33c6deabe809f98d31410c6848f9.zip gcc-8d6bd4a7917e33c6deabe809f98d31410c6848f9.tar.gz gcc-8d6bd4a7917e33c6deabe809f98d31410c6848f9.tar.bz2 |
random (minstd_rand0, [...]): Use unsigned long as implementation-defined type.
2006-07-14 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random (minstd_rand0, minstd_rand, ranlux3, ranlux4):
Use unsigned long as implementation-defined type.
From-SVN: r115450
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/random | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b9420e0..af5c7a9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2006-07-14 Paolo Carlini <pcarlini@suse.de> + * include/tr1/random (minstd_rand0, minstd_rand, ranlux3, ranlux4): + Use unsigned long as implementation-defined type. + +2006-07-14 Paolo Carlini <pcarlini@suse.de> + * include/tr1/random.tcc (struct _To_Unsigned_Type): Add. (subtract_with_carry<>::seed(_Gen&, false_type)): Use an unsigned type in the loop, fix factor multiplier, take g diff --git a/libstdc++-v3/include/tr1/random b/libstdc++-v3/include/tr1/random index 5810986..59e326d 100644 --- a/libstdc++-v3/include/tr1/random +++ b/libstdc++-v3/include/tr1/random @@ -443,12 +443,12 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) /** * The classic Minimum Standard rand0 of Lewis, Goodman, and Miller. */ - typedef linear_congruential<unsigned int, 16807, 0, 2147483647> minstd_rand0; + typedef linear_congruential<unsigned long, 16807, 0, 2147483647> minstd_rand0; /** * An alternative LCR (Lehmer Generator function) . */ - typedef linear_congruential<unsigned int, 48271, 0, 2147483647> minstd_rand; + typedef linear_congruential<unsigned long, 48271, 0, 2147483647> minstd_rand; /** @@ -1056,7 +1056,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) * James's luxury-level-3 integer adaptation of Luescher's generator. */ typedef discard_block< - subtract_with_carry<int, (1 << 24), 10, 24>, + subtract_with_carry<unsigned long, (1 << 24), 10, 24>, 223, 24 > ranlux3; @@ -1065,7 +1065,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) * James's luxury-level-4 integer adaptation of Luescher's generator. */ typedef discard_block< - subtract_with_carry<int, (1 << 24), 10, 24>, + subtract_with_carry<unsigned long, (1 << 24), 10, 24>, 389, 24 > ranlux4; |