howa wrote:
Hi,

Hello,

I want to have a max range of rand function, so I use

my $rnd = rand(4294967295) ;

However, is it safe to use so, e.g. in 32 bit system?

rand() returns a floating point number that is based on RANDBITS and not the size of the CPU registers, so to see how many bits rand() uses run this on the command line:

perl -V:randbits

On my 32 bit computer I have 48 RANDBITS.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to