[SciPy-dev] Release of scipy core beta will happen next week.

Charles Harris charles.harris at sdl.usu.edu
Tue Sep 27 19:54:37 EDT 2005




-----Original Message-----
From: scipy-dev-bounces at scipy.net on behalf of Robert Kern
Sent: Tue 9/27/2005 2:08 PM

>Charles Harris wrote:
>> Thought I should include a link to the random module documentation. 
>> 
>> http://docs.python.org/lib/module-random.html
>> 
>> I've also implemented the ziggurat method -- with some small improvements -- 
>> for the generation of gaussian distributions if you are interested.

> I think I'm sticking with Box-Mueller for gaussian variates.

Fair enough. If we ever optimize for speed, there are some quirks to bear in mind
for Intel (and AMD) architectures. For instance, longs convert to doubles faster
than unsigned longs:

http://www.doornik.com/research/randomdouble.pdf


I've attached two parts of the Gaussian Ziggurat method. Note that I have used an exponential
tail on the ziggurat instead of the usual Gaussian tail as the algorithm is a bit simpler
IMHO. Anyway, the first attachment is a python program to compute the required constants
a and r, the second a c++ class for the computation of the variates themselves. These 
aren't thoroughly tested, so there is the possibility of brown bags in my future.


_______________________________________________
Scipy-dev mailing list
Scipy-dev at scipy.net
http://www.scipy.net/mailman/listinfo/scipy-dev


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5949 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20050927/2477db70/attachment.bin>


More information about the SciPy-Dev mailing list