What happens when...

Feel free to talk about anything and everything in this board.
Post Reply
draconic74
Green Beret
Posts: 3470
Joined: Sat Jun 03, 2006 11:08 am
Contact:

What happens when...

Post by draconic74 » Mon Nov 08, 2010 11:33 am

... 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...
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests