Page 1 of 1

What happens when...

Posted: Mon Nov 08, 2010 11:33 am
by draconic74
... you decide to write a program randomly attempting to hit RAND_MAX.

Image

After 5 minutes, I never did get RAND_MAX. Its hard to hit one specific number out of 2,147,483,647. I wonder how many random numbers it churned through per second. Perhaps I will make a program for that.

EDIT: It appears to be that the program can generate between 950,000 and 1,100,000 random numbers per second. 5 minutes...