BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
I want a rand function that produces lots of small numbers and a few big ones.
Say twice as many 0-9, as 10..99. And twice as many 0-99 as 100-999,. Etc.
Feels like log10 should be in there somewhere. Or maybe 10**something.
Note: I'm not looking for a function embedded in one of the big Math::* C libraries, as I will almost certainly want to tweak the distribution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rand() with ?log10? distribution?
by primo (Scribe) on Jun 07, 2013 at 03:39 UTC | |
by BrowserUk (Patriarch) on Jun 07, 2013 at 05:47 UTC | |
|
Re: Rand() with ?log10? distribution? (math)
by tye (Sage) on Jun 07, 2013 at 03:55 UTC | |
by BrowserUk (Patriarch) on Jun 07, 2013 at 05:51 UTC | |
|
Re: Rand() with ?log10? distribution?
by v-zor (Initiate) on Jun 10, 2013 at 01:31 UTC |