I've been looking around for code snippets for generating pseudo-random numbers.
A lot of them seem to be very similar, for example
double findnoise(int x)
{
int x = (x<<13) ^ x;
return (double)( 1.0 - ( (x * (x * x * 15731 + 789221) + 1376312589) & Ox7fffffff) / 1073741824.0);
}
Can someone tell me what the (x<<13)^x does regarding the random number being produced,please? (I know what << and ^ do as far as writing code is concerned.)
Thanks.