in reply to max random
just wondering... what is the highest number perl's random variable can handle? thanx... LisaJust 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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: max random
by ysth (Canon) on Sep 27, 2005 at 11:04 UTC | |
by blazar (Canon) on Sep 27, 2005 at 11:20 UTC | |
|
Re^2: max random
by xdg (Monsignor) on Sep 27, 2005 at 11:28 UTC |