Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!uw-beaver!mit-eddie!wuarchive!sdd.hp.com!samsung!spool.mu.edu!uunet!stephsf!wengland From: wengland@stephsf.stephsf.com (Bill England) Newsgroups: comp.lang.perl Subject: Re: random numbers? Message-ID: <490@stephsf.stephsf.com> Date: 14 Feb 91 19:23:40 GMT References: <16698@venera.isi.edu> <3#3Gz8.j@cs.psu.edu> <481@stephsf.stephsf.com> Organization: Stephen Software Systems, Inc., Tacoma WA Lines: 28 That rand_test script in the previous post was a bit slow. Here is a much faster one: --- #!perl srand(1); $seq = 0; while ( $seq++ < 10000){ $seed = rand(2147483648); if( $seq == 10000){ print $seed, "\n"; if( $seed == 1043618065 ){ print"random.c is successfully integrated into Perl.\n"; }else{ print"random.c DID NOT install into Perl correctly! \n"; } } } -- +- Bill England, wengland@stephsf.COM -----------------------------------+ | * * H -> He +24Mev | | * * * ... Oooo, we're having so much fun making itty bitty suns * | |__ * * ___________________________________________________________________|