MBS Xojo Developer Conference and Training
Join us from 11th to 14th September 2013 in Koblenz.
Join us from 11th to 14th September 2013 in Koblenz.
Random Number Generation (Real Studio network user group Mailinglist archive)
Back to the thread list
Previous thread: Re: [OT] super user in OS X - THANKS!
Next thread: [OT] super user in OS X
| Random Number Generation |
| Date: 07.01.03 19:27 (Tue, 7 Jan 2003 13:27:32 -0500) |
| From: jeffb |
|
Can anyone post the algorithm used by RealBasic to generate random numbers
(rnd)...and/or can someone describe it (for example, does RealBasic use "the linear-congruential method" etc...). Also, are there any code snippets written in basic that a beginner could implement (paste into a RB project) to generate pseudorandom numbers without calling the rnd function? Thanks for your help, Jeff Jeffrey J. Borckardt, M.A. Ph.D. Candidate, Clinical Psychology Clinical Psychology Intern Medical University of South Carolina <email address removed> http://web.utk.edu/~jeffb --- A searchable archive of this list is available at: <http://dbserver.realsoftware.com/KBDB/search.php> Unsubscribe: <mailto:<email address removed>> Subscribe to the digest: <mailto:<email address removed>> |
| Re: Random Number Generation |
| Date: 08.01.03 02:25 (Tue, 7 Jan 2003 17:25:59 -0800) |
| From: Seth Willits |
|
On Tuesday, January 7, 2003, at 10:27 AM, jeffb wrote:
> Can anyone post the algorithm used by RealBasic to generate random > numbers > (rnd)...and/or can someone describe it (for example, does RealBasic > use "the > linear-congruential method" etc...). We don't have that knowledge. > Also, are there any code snippets written in basic that a beginner > could > implement (paste into a RB project) to generate pseudorandom numbers > without > calling the rnd function? Any of the code in C should be easy enough to look at. Pick an algorithm and I'll convert it for you, however converting is slower than implementing it in C, so a plugin would be more useful in this situation. Seth Willits ------------------------------------------------------------------------ --- President and Head Developer of Freak Software - http://www.freaksw.com Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -- Albert Einstein ------------------------------------------------------------------------ --- --- A searchable archive of this list is available at: <http://support.realsoftware.com/KBDB/search.php> Unsubscribe: <mailto:<email address removed>> Subscribe to the digest: <mailto:<email address removed>> |
| Re: Random Number Generation |
| Date: 08.01.03 02:46 (Tue, 7 Jan 2003 20:46:05 -0500) |
| From: Charles Yeomans |
|
On Tuesday, January 7, 2003, at 08:25 PM, Seth Willits wrote: > On Tuesday, January 7, 2003, at 10:27 AM, jeffb wrote: > >> Can anyone post the algorithm used by RealBasic to generate random >> numbers >> (rnd)...and/or can someone describe it (for example, does RealBasic >> use "the >> linear-congruential method" etc...). > > We don't have that knowledge. > >> Also, are there any code snippets written in basic that a beginner >> could >> implement (paste into a RB project) to generate pseudorandom numbers >> without >> calling the rnd function? > > Any of the code in C should be easy enough to look at. Pick an > algorithm and I'll convert it for you, however converting is slower > than implementing it in C, so a plugin would be more useful in this > situation. > Doug Holton wrote a good PRNG plugin. I don't believe that he's maintaining it anymore, but he told me that I could serve it from my site, which I will do Real Soon Now. I think that Bob Delaney's Precision Plugin can generate random numbers. Charles Yeomans --- A searchable archive of this list is available at: <http://support.realsoftware.com/KBDB/search.php> Unsubscribe: <mailto:<email address removed>> Subscribe to the digest: <mailto:<email address removed>> |
| Re: Random Number Generation |
| Date: 08.01.03 02:55 (Tue, 07 Jan 2003 17:55:50 -0800) |
| From: Brian Gaines |
|
I asked a similar question last September and Bob Delaney posted the
C code on Thu, 5 Sep 2002 14:01:51 and later(8 Sep 2002 19:38:43 ) posted a fully documented version of it as a plugin on his website. If you look into the archives under Delaney, those two items of mail will answer your questions very effectively, b. >Can anyone post the algorithm used by RealBasic to generate random numbers >(rnd)...and/or can someone describe it (for example, does RealBasic use "the >linear-congruential method" etc...). > >Also, are there any code snippets written in basic that a beginner could >implement (paste into a RB project) to generate pseudorandom numbers without >calling the rnd function? --- A searchable archive of this list is available at: <http://support.realsoftware.com/KBDB/search.php> Unsubscribe: <mailto:<email address removed>> Subscribe to the digest: <mailto:<email address removed>> |
| Re: Random Number Generation |
| Date: 08.01.03 03:39 (Tue, 7 Jan 2003 20:39:24 -0600) |
| From: Bob Delaney |
|
My plugin can be found at:
http://homepage.mac.com/delaneyrm/MMrngPlugin.html Bob >I asked a similar question last September and Bob Delaney posted the >C code on Thu, 5 Sep 2002 14:01:51 and later(8 Sep 2002 19:38:43 ) >posted a fully documented version of it as a plugin on his website. >If you look into the archives under Delaney, those two items of mail >will answer your questions very effectively, b. > >>Can anyone post the algorithm used by RealBasic to generate random numbers >>(rnd)...and/or can someone describe it (for example, does RealBasic use "the >>linear-congruential method" etc...). >> >>Also, are there any code snippets written in basic that a beginner could >>implement (paste into a RB project) to generate pseudorandom numbers without >>calling the rnd function? > >--- >A searchable archive of this list is available at: ><http://support.realsoftware.com/KBDB/search.php> >Unsubscribe: ><mailto:<email address removed>> >Subscribe to the digest: <mailto:<email address removed>> --- A searchable archive of this list is available at: <http://support.realsoftware.com/KBDB/search.php> Unsubscribe: <mailto:<email address removed>> Subscribe to the digest: <mailto:<email address removed>> |
| Re: Random Number Generation |
| Date: 08.01.03 16:18 (Wed, 8 Jan 2003 09:18:50 -0600) |
| From: Aaron Ballman |
|
>Can anyone post the algorithm used by RealBasic to generate random numbers
>(rnd)...and/or can someone describe it (for example, does RealBasic use "the >linear-congruential method" etc...). I can't post the code (obviously), but in 4.5 (for rnd) we use a linear congruential generator. For 5.0, we made a new class that uses the additive congruential method (and tends to make better random numbers). >Also, are there any code snippets written in basic that a beginner could >implement (paste into a RB project) to generate pseudorandom numbers without >calling the rnd function? I am not certain about whether they are in basic, but since math is math (and looks the same in just about every language), I'm sure you can find some pseudocode, or C snippets on the net for every random number generation method out there. ~Aaron |
Links
MBS Real Studio Chart Plugins