Inspired by [General purpose random number generation](https://stackoverflow.com/questions/26435567/general-purpose-random-number-generation) I decided to perform my own tests to see what was wrong with rand(). Using this program:

```
srand(time(0));
for (int i = 0; i < 1000000; ++i)
{
    std::cout << rand() % 1000 << " ";
}

```

I loaded it up in Octave using the commands:

```
S = load("test.txt")
hist(S)

```

And got this result:

![result](https://i.stack.imgur.com/W2rO9.png)

To me the results seem to be pretty uniform. I expected the results to be more skewed. Did I conduct my test wrong?