hi,

as people above mentioned you have to know for what you need the generator for. my personal opinion is as far as the software type random number generator goes, all of them are a joke if meant to be used for some real cryptography. rand() function in perl is inhereted from libc that has a RAND_MAX from 2**15 - 2**31 which is also interesting because since perl doesn't handle big integers very well by default, you need to use bigint.

also i read somewhere that the authors of rand() function guarantee that the number you get is a random but they don't guarantee that more of them are random - which implies that there is a pattern within the whole system.

to me regular MT with a period of 2**k-1 , k = 19937, is more than enough for my simulations. but i can't say if it will satisfy your requests. my former coworker had this problem with MT and some other algorithms (the period wasn't enough for him), so he turned to QRBG. now, this is a machine based generator that is nothing like software generators and it guaranties the randomness of one number or more of them. so my advice is : start worrying when the problem emerges, until then use rand() build-in function.

cheers


In reply to Re: Upper limit to Mersenne Twister Algorithm? by baxy77bax
in thread 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.