just wondering... what is the highest number perl's random variable can handle? thanx... Lisa
Just a minor nitpick: rather than to a hypothetical "perl's random variable" you're really asking about the bit depth of rand, aren't you? Them, as many people already told you, it should be 48.

But beware! it depends on a compiler option. The (easiest) way to find it out, not mentioned yet, is:

perl -V:randbits

In particular under all Linux platforms I've had access to, indeed it's 48. But for some reason AS's popular ActivePerl distro has it set to 15!!

Pay attention to this circumstance: I've been bit in the neck myself, as you can see at these clpmisc threads: Re: Fast random string generation, and the subsequent Linux vs. Windows: different behaviour..., also available from Google Groups respectively here and here.

Basically I was suggesting a fast way to generate a 20_000 chars long random string by means of generating them 4 at a time, but it happened to "fail" (some of them were constantly nulls) under Windows.


In reply to Re: max random by blazar
in thread max random by wolverina

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.