Page 1 of 1

Question about RND function

Posted: Thu Jan 17, 2013 7:08 pm
by GSAC3
Marco:

Can the seed used by the random number generator (RND) be set?  If so, how can it be done?  Is there something like a "RANDOMIZE(x)" function?

I am trying to create repeatable lists of random numbers.

Don

Question about RND function

Posted: Thu Feb 07, 2013 8:48 am
by Giovanni Di Maria
Try with:
random= (rnd(n) + timer) mod n
Giovanni Di Maria
www.elektrosoft.it


Question about RND function

Posted: Thu Feb 07, 2013 4:43 pm
by Marco
Hi, i just see this.
the seed of rnd is always 1 the max number can be set ; rnd(0-max)
after that you must do a little calculation.
supose you want have a seed of .5 to the max of 20.
the syntax must be random=rnd(40)*.5 then you get a seed of .5 between 0 and 20 (=.5*40)
if you want those number between 100 and 120 just add 100;
random=rnd(40)*.5+100
I hope this will help you
best regards

Question about RND function

Posted: Fri Feb 08, 2013 12:22 am
by GSAC3
Marco:

Thanks for your reply, but maybe I did not make myself clear.

What I would like to be able to do is set the INITIAL SEED each time I use the random number generator, as most other random number generators allow, in order to assure that the random number sequence produced is the same each time the generator is initialized with the same seed before it is used.

Right now, it appears that the INITIAL SEED that RND uses is itself random.

Is there some way to set the INITIAL SEED before RND is used to produce a sequence of random numbers?

Don


Question about RND function

Posted: Mon Feb 11, 2013 12:00 am
by Bob Hays
Admin

Could you add a Randomize function that would give us this capability?  :question
Sometimes it is adventagious to have pre-determined random numbers for testing.

Question about RND function

Posted: Fri Feb 15, 2013 4:27 pm
by Marco
yes, it alright with me. although its not really random any more. I will build in a vb like function and leave the old rnd in.
best regards

Question about RND function

Posted: Sun Feb 17, 2013 9:05 pm
by GSAC3
Thanks Marco!

Don

Question about RND function

Posted: Tue Oct 15, 2013 4:16 am
by GSAC3
Marco:

Have you had a chance to build in a new vb like function to generate random numbers using a user-specified initial seed yet?

Don

Question about RND function

Posted: Tue Oct 15, 2013 3:35 pm
by Marco
yes, i had to look in my readme. It comes with the next update.
And the next update comes soon.
So please wait a little, i had to check fnx before the update.

best regards marco

Question about RND function

Posted: Tue Oct 15, 2013 6:54 pm
by GSAC3
Marco:

Thanks very much for the update.

I know you must be busy with FNX update work, and I really appreciate your response to my query.

Don