srand(0)
and srand(1)
give the same results. srand(2)
, srand(3)
, etc. give different results.
Any reason why seed = 0
and seed = 1
yield the same random sequence?
Can't find an explanation in the man page. Only that if a seed is not provided, seed = 1
is used.
Thanks.
Within the glibc sources for
srandom_r
(which is aliased tosrand
), line 179:It's just an arbitrary decision basically.