I'm assuming you're on a Win32 system (you mention >32k integers. Win32 CRT rand is limited to 15-bits of output. Most other systems (*nix at least) have 48-bit rands in their CRTs). If that assumption is correct, you might be able to bypass the compiler issue by doing a binary install from PPD.

You don't indicate how rigourous your random requirements are, but the problem with deriving more bits of randomness from less is that the process invariably acts to compound the flaws in the underlying PRNG. If you plot the values from the Win32 Perl rand function on a 2D grid (jpg or png) and increment the color of the pixel each time you generate the same value, you very quickly see distinct banding appear where the distribution of the output is very non-uniform. If you combine random values from a flawed PRNG in an attempt to increase teh number of bits, it almost invariably compounds the banding effect and leads to a highly skewed output distribution.

Essentially, you cannot manufacture more bits of randomness, only re-use the existing ones, and that leads to a Doppler effect. The rarified (below random chance) parts of the distribution tend to get further rarified, whilst the above average parts of the distribution tend to combine and reinforce each other leading to very uneven distributions.

Maybe this doesn't affect your application, but if your algorithm depends upon an even distribution for its operation (eg. Monte Carlo Simulations), then you'd be well advise to seek a good PRNG up front rather than discovering that you are skewing your results from the outset.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: Randomizing Large Integers by BrowserUk
in thread Randomizing Large Integers by hangon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.