Re: Generating Random Numbers with Normal Distribution
| From: | Stephen Johnson | Date: | Mon, 10 Dec 2007 19:37:27 +0000 |
| Subject: | Re: Generating Random Numbers with Normal Distribution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265617@lists.php.net to get a copy of this message | ||
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.
--
Stephen Johnson c | eh
The Lone Coder
http://www.thelonecoder.com
continuing the struggle against bad code
http://www.thumbnailresume.com
--
> From: AmirBehzad Eslami <behzad.eslami@gmail.com>
> Date: Mon, 10 Dec 2007 22:58:36 +0330
> To: PHP General list <php-general@lists.php.net>
> Subject: [PHP] Generating Random Numbers with Normal Distribution
>
> Dear list,
>
> For some computer-based simulation, i need to
> generate random numbers that have a normal distribution.
>
> It seems that PHP's rand() and mt_rand() functions return
> uniformly distributed numbers which is not suitable for
> simulation purposes.
>
> Is there any way to generate random numbers with
> normal distribution in PHP?
>
> Thanks in advance
> -abe
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>