|
|
|
|
|
by tfinniga
4353 days ago
|
|
It depends on the pseudorandom number generator that you're using, but you'd be hard pressed to find a standard library prng where similar seeds produced similar random numbers. That would be pretty bad design. For example, here is some code I wrote to test my own prng: srand(1000000);
for( int i = 0; i < 10; i++ )
printf( "%d\n", rand() ); printf("====\n"); srand(1000001);
for( int i = 0; i < 10; i++ )
printf( "%d\n", rand() ); And here is the result: 21585
18586
29373
4301
3304
21158
23657
21142
2144
26110
====
21589
29335
14469
28364
13618
25085
26770
18215
18656
19962 As you can see, they diverge really quickly. |
|