Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

(MeowChow) Re: perl rand() function

by MeowChow (Vicar)
on Apr 16, 2002 at 10:46 UTC ( #159449=note: print w/replies, xml ) Need Help??

in reply to perl rand() function

Yes, it is zero inclusive, however, I wouldn't be waiting around for perl -e '1 while rand' to finish within my lifetime.
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
(tye)Re: perl rand() function
by tye (Sage) on Apr 16, 2002 at 15:02 UTC

    I'm so sorry that MeowChow was diagnosed as terminally ill with less than 1 second expected to live! I'm just glad the submit button got pressed before the end.

    % perl -de 0 ... DB<1> $c=0; print ''.localtime(),$/; $c++ while rand; print ''.local +time(),$",$c,$/ Tue Apr 16 07:57:24 2002 Tue Apr 16 07:57:24 2002 55285 DB<2> $c=0; print ''.localtime(),$/; $c++ while rand; print ''.local +time(),$",$c,$/ Tue Apr 16 07:57:28 2002 Tue Apr 16 07:57:28 2002 82230

    Update: To be more informative rather than just humorous, I'll note that     perl -MConfig -e 'print $Config{randbits}'
    reports 15 for me. If I managed to build Perl such that this value got all the way up to 32, then I'd project MeowChow's life expectancy at a bit under 45 minutes. If I got that up to 48, then we'd be talking closer to 5 years. And if I got it up to 64, then I'd agree with MeowChow that waiting around 350,000 years wasn't worthwhile. (:

            - tye (no, I don't own a Cray)
      tye, you absolutely slay me :)
                     s aamecha.s a..a\u$&owag.print

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159449]
[SuicideJunkie]: LanX So, basically, you're saying that Trump and Trump were the only ones doing it wrong there.

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2018-03-22 20:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (286 votes). Check out past polls.