drs wrote:
Is there any way to generate random numbers based on arbitrary real valued
functions? I am looking for something like random.gauss() but with natural
log and exponential functions.

thanks,

-d


I remember for having used it on a gaussian generator that you can do that very easily by yourself:
- you generate a random real number in the range [0 .. 1],
- then you apply an inverse probability density function (e.g. inverse gaussian pdf : http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/rigpdf.htm),
and you have then your random number following the specified law (here gaussian).
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to