RE: [PHP] Generating Random Numbers with Normal Distribution
| From: | bruce | Date: | Mon, 10 Dec 2007 19:58:38 +0000 |
| Subject: | RE: [PHP] Generating Random Numbers with Normal Distribution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265620@lists.php.net to get a copy of this message | ||
if you really want to.. you can hook various devices up to your
serial/parallel port and take specific readings, and from there compute some
really great random numbers..
i think white noise from frequency generators/scopes have been used by
research functions...
google is your friend in this regard!! however, for what you're trying to
accomplish, php (or any other language) is probably more than quite
suitable!!
have fun....
-----Original Message-----
From: Nathan Nobbe [mailto:quickshiftin@gmail.com]
Sent: Monday, December 10, 2007 11:41 AM
To: Stephen Johnson
Cc: AmirBehzad Eslami; PHP General list
Subject: Re: [PHP] Generating Random Numbers with Normal Distribution
On Dec 10, 2007 2:37 PM, Stephen Johnson <maillists@thelonecoder.com> wrote:
> True randomization is only really possible in nature, so I am not sure you
> ever be completely happy with programming random numbers... But it may
> help
> you get better results if you include srand() in your randomization code.
the seeding methods have been deprecated; this from the manual:
*Note*: As of PHP 4.2.0, there is no need to seed the random number
generator with srand() <http://us3.php.net/manual/en/function.srand.php>
or
mt_srand() <http://us3.php.net/manual/en/function.mt-srand.php>
as this is
now done automatically.
-nathan