[vox-tech] random number in C
Peter Jay Salzman
vox-tech@lists.lugod.org
Tue, 2 Apr 2002 15:08:32 -0800
argh. i've been running jobs and collecting data non-stop without a
break since 5:30am. 9.5 hours without a rest, and clearly i'm not
thinking straight at all.
shawn, i'm pretty embarrased, but appreciate the reply. thanks for
pointing this out to me. rand() was being seeded with 1. oh my gosh.
sorry everyone!
pete
begin Shawn P. Neugebauer <spn@ucdavis.edu>
> On Tuesday 02 April 2002 02:47 pm, you wrote:
> > ...
> > so now i comment out the call to SeedRandomGenerator() and replace it by
> >
> > int main(int argc, char *argv[])
> > {
> > ...
> > /* seed = SeedRandomGenerator(); */
> > seed = 3497451914;
> > ...
>
> and you called srand(seed) after this, yes? otherwise the default seed is 1,
> and it will be 1 on each run.
>
> shawn.
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech