Thanks. The article was very interesting, and produced a very useful piece of information.
So, as of perl 5.8.1, rand is limited to 15-bits! S'funny how long you can go with discovering, reading about or falling foul of these things. Anyway. I have now addedE:\perl5.8.1\bin>.\perl -MPOSIX=RAND_MAX -e"print RAND_MAX" 32767
use Math::Random::MT qw[ srand rand ];
to my .pl template file.
This uses The Mersenne Twister PRNG, rather than a Linear Congruential one, and is good for producing the full range of 32-bit unsigned integers.
In reply to Re: Re: Re: Re: A little C code converted to Perl *HELP*
by BrowserUk
in thread A little C code converted to Perl *HELP*
by regnab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |