I'd never encountered the apparant 16-bit limitation of perl's built-in rand function.Hmm... I always thought it was 24 bits. Maybe not for perl?
Anyway, this old TPJ article (from 1996) discusses rand() in a little more depth, including the repeat cycle, for which slavishly following up the example implementation, in ANSI C libraries, is to blame. That was then... things might have changed since then, depending on the agenda of the P5P.
In reply to Re: Re: Re: A little C code converted to Perl *HELP*
by bart
in thread A little C code converted to Perl *HELP*
by regnab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |