Mersenne Twister example in SDK

Hi,

I am trying to modify the MersenneTwister example in the SDK and use it in my own program. I found that the example in the original form works fine.

However, if I change the number of points to generate, say to 24000, then it doesn’t generate uniformly random numbers.

Please check the pictures. The first one has PATH_N = 24000000, the second one has PATH_N = 24000. You can see there is big difference.

How to fix this? Thanks.

Bo
24000.jpg
24000000.jpg

24000.jpg

24000000.jpg