[C] Random numbers: A problem with my random seed?

Okay, look, I agree with you that "Often the first few values returned by rand are not particularly random if similar seeds are used" was a pretty poor, imprecise way of saying what I meant.

What I meant, as I clarified later, was that similar seeds often yield similar return values from rand for the first few iterations. I think I expressed this a little better in the very next sentence in my original comment: "It takes a few iterations for similarly seeded runs of the generator to diverge."

I also agree with you that "good" and "few" are not mathematically precise terms. I was not attempting to make a mathematically precise statement. "Calling me out" for not being precise when that was not my intention is pointless.

Most implementations of rand use a linear congruential generator.

"most" ? really ? you checked all major implementations of rand() ? Or you're hinging this on the definition of "most", just like how you know what makes an RNG "good".

What? No, I'm not just making that up or basing it on my own investigations. I cited a source for that statement:

"System-supplied rand()s are almost always linear congruential generators..." —Numerical Recipes in C.

Do I need to go find more sources to satisfy you? What do you want here?

All of a sudden you get conscientious of having your "point" obfuscated by your muddy and ignorant judgement about the first "few" values from an RNG.

I was literally just describing the phenomenon that OP demonstrated in the original post. There's no "muddy and ignorant judgement" here; there's no judgment at all. You can see this phenomenon for yourself, right at the top of the thread: similarly seeded runs of rand generate streams of numbers that begin similarly. This phenomenon is the entire point of OP's question. I was just describing that phenomenon in words to point out that it's not an uncommon thing to see. I don't know how you can argue with the fact that this phenomenon happens unless you're just completely ignoring the program output that OP posted and asked about.

/r/learnprogramming Thread