[Bug c/34096] Random number generates the same set of numbers

2007-11-14 Thread wilson at specifix dot com
--- Comment #3 from wilson at specifix dot com 2007-11-15 01:41 --- Subject: Re: Random number generates the same set of numbers rsanghavi at gmail dot com wrote: > --- Comment #2 from rsanghavi at gmail dot com 2007-11-14 22:32 --- > But, even if you seed it, the result is th

[Bug c/34096] Random number generates the same set of numbers

2007-11-14 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-11-14 22:28 --- You forgot to seed the random number generator. This is not a bug in GCC no matter which you look at it, the random function is not part of GCC. -- pinskia at gcc dot gnu dot org changed: What|Re

[Bug c/34096] Random number generates the same set of numbers

2007-11-14 Thread rsanghavi at gmail dot com
--- Comment #2 from rsanghavi at gmail dot com 2007-11-14 22:32 --- Andrew, Thanks for answering my question. But, even if you seed it, the result is the same unless you seed it with a random number. I use (time(0) + random number) as seed in my code. I am unaware and so asking you, if