Re: Generating Random Numbers with Normal Distribution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Date: Mon, 10 Dec 2007 22:58:36 +0330
> To: PHP General list <php-general@xxxxxxxxxxxxx>
> Subject:  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
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux