Umm not exactly, I guess I didn't make myself clear.
My proposed algorythm *does not* meet the same
requirements, namely top and bottom. It instead
provides what I imagine the original algorythm would
most likely be used for which is providing "random"
values centered around a given value (the average).
UPDATE: Note this simpler method makes more
sense for the physicists as well. The other algorythm
produces many outliers which ought to be discarded
in a real data set.
Average=50, Range=10
Average: Avg - Rng/2: Avg - Rng/2 + rnd(Rng):
45----50----55 45----50----55 45----50----55
* * ????? ??????
Since rnd can return anything between 0
(minimum) or Range (maximum) we get a
full spread. It may also be interesting
to note that this is equivalent to
sub f{average+range/2-rnd(range)}
--
perl -pe "s/\b;([st])/'\1/mg"
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.