in reply to Re: A little C code converted to Perl *HELP*
in thread A little C code converted to Perl *HELP*
I'd never encountered the apparant 16-bit limitation of perl's built-in rand function. most random numbers I use are pretty small. Having fallen foul of of it, I went to CPAN to look for an alternative and found Math::Random::MT which emulates (and replaces if you choose) the built-in rand and srand functions 1-for-1, and doesn't suffer this limitation. I can't vouch for the randomness of it's output (yet), but given it's authorship, it bodes well.
It uses XS, so you would need to compile it, (or download a compatible binary version AS 5.8) for your version of perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: A little C code converted to Perl *HELP*
by bart (Canon) on Nov 04, 2003 at 04:00 UTC | |
by BrowserUk (Patriarch) on Nov 04, 2003 at 04:55 UTC |