Hey all,

I've recently been trying to update my understanding of perl's rand() function and the improvements / better implementations available. I believe I understand why using Math::Random::MT is a better idea overall. But, given my own minimal mathematical background, I cannot figure out when the MT implementation is 'not enough'. I'm also not sure if this is something I should ever worry about (I'm not really doing complex statistical modeling -- I'm just curious).

So, my questions are 1) is there an upper limit on the usefulness to Math::Random::MT, where another algorithm is better? 2) Are there even any better approaches, currently, than Math::Random::MT in perl?

Edit: By 'better', I mean when the algorithm begins to break down in its ability to be random. Or when the values begin to repeat one after another after enough iterations. I'm not really interested in relative speeds or security atm for this question.

Edit2: Thanks everyone for replying. I think I've got a lot more information now, and some of the answers I was looking for.

Thanks

In reply to Upper limit to Mersenne Twister Algorithm? by tritan

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.