From 21df391dc6055884e621181cbc3b51d9ec2b095c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 19:10:54 +0000 Subject: Added Mersenne Twister random number generator. --- src/tests/random.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/random.cpp b/src/tests/random.cpp index 95cdb0a..d7b94ce 100644 --- a/src/tests/random.cpp +++ b/src/tests/random.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -15,7 +16,7 @@ void coverage() uint32_t uBucket[78]; memset( uBucket, 0, sizeof(uint32_t)*78 ); - for( int j = 0; j < 1000; j++ ) + for( int j = 0; j < 1000000; j++ ) { uBucket[(int)(((uint32_t)rand.rand())/(double)(0xfffffffful)*78+0.5)]++; } @@ -43,6 +44,7 @@ int main() coverage(); coverage(); coverage(); + coverage(); return 0; } -- cgit v1.2.3