Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Vinzent Hoefler
On Friday 03 March 2006 12:55, Vincent Snijders wrote: > Jonas Maebe wrote: > > On 3 mrt 2006, at 13:42, Vinzent Hoefler wrote: > >>> BTW, I never would have guessed that the random number generator > >>> would have used threadvars. I would have thought, that on app > >>> start you would set one ra

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Vincent Snijders
Jonas Maebe wrote: On 3 mrt 2006, at 13:42, Vinzent Hoefler wrote: BTW, I never would have guessed that the random number generator would have used threadvars. I would have thought, that on app start you would set one randseed and then call random from all threads. Considering that the stat

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Jonas Maebe
On 3 mrt 2006, at 13:42, Vinzent Hoefler wrote: BTW, I never would have guessed that the random number generator would have used threadvars. I would have thought, that on app start you would set one randseed and then call random from all threads. Considering that the state array for the Merse

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Vinzent Hoefler
On Monday 27 February 2006 08:41, Vincent Snijders wrote: > BTW, I never would have guessed that the random number generator > would have used threadvars. I would have thought, that on app start > you would set one randseed and then call random from all threads. Considering that the state array f

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Jonas Maebe
On 27 feb 2006, at 09:41, Vincent Snijders wrote: Some other workaround that comes to my mind is to do something like Randomize; RandSeed := RandSeed * getpid; This worked, cut the initial generation time from about 30 seconds down to under 1, of course right now it's NOT platform indepen

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Vincent Snijders
A.J. Venter wrote: Some other workaround that comes to my mind is to do something like Randomize; RandSeed := RandSeed * getpid; This worked, cut the initial generation time from about 30 seconds down to under 1, of course right now it's NOT platform independent at all so I will need to e

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Jonas Maebe
On 27 feb 2006, at 00:15, A.J. Venter wrote: Randomize; RandSeed := RandSeed * getpid; This worked, cut the initial generation time from about 30 seconds down to under 1, of course right now it's NOT platform independent at all so I will need to enhance it but I like the direction of

Re: [fpc-pascal] Better random numbers ?

2006-03-03 Thread Tomas Hajny
On 27 Feb 06, at 1:15, A.J. Venter wrote: > > Some other workaround that comes to my mind is to do something like > >Randomize; > >RandSeed := RandSeed * getpid; > This worked, cut the initial generation time from about 30 seconds down to > under 1, of course right now it's NOT platform i

Re: [fpc-pascal] Better random numbers ?

2006-02-26 Thread A.J. Venter
> Some other workaround that comes to my mind is to do something like >Randomize; >RandSeed := RandSeed * getpid; This worked, cut the initial generation time from about 30 seconds down to under 1, of course right now it's NOT platform independent at all so I will need to enhance it but

Re: [fpc-pascal] Better random numbers ?

2006-02-26 Thread Jeff Miller
> Hi, I am using standard run of the mill randomize/random() calls in a program > to generate random numbers, used in turn to select random data which is fed > into another program. You are just supposed to call randomize once, to initialize the random number generator. You then call random ove

Re: [fpc-pascal] Better random numbers ?

2006-02-26 Thread Michalis Kamburelis
A.J. Venter wrote: Hi, I am using standard run of the mill randomize/random() calls in a program to generate random numbers, used in turn to select random data which is fed into another program. (All this just to create a multi-language enabled module structure eh) Well there is just one littl

[fpc-pascal] Better random numbers ?

2006-02-26 Thread A.J. Venter
Hi, I am using standard run of the mill randomize/random() calls in a program to generate random numbers, used in turn to select random data which is fed into another program. (All this just to create a multi-language enabled module structure eh) Well there is just one little problem, on the com