[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Am I misunderstanding random numbers?
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 16 Mar 2010 05:17:38 -0500
On Tue, Mar 16, 2010 at 3:54 AM, Christopher Eykamp <chris@eykamp.com> wrote:
> When I run the following snippet, I get unexpected results. About 50% of
> the results are the same (I've omitted the different ones from my results
> list, because they're not as interesting :-)
>
>
> math.randomseed( __randomSeed )
> print ("Seed: ".. __randomSeed,
> math.random(10000),math.random(10000),math.random(10000),math.random(10000))
are you sure the RNG isn't 'reseeded' before the call to print() ?
what platform are you using?
on two _very_ different platforms (a kubuntu Linux x86_64 and an
embedded MIPS box) i get consistent results with same seeds, but not
the values you're seeing there.
--
Javier