[NumPy-Tickets] [NumPy] #1450: Patch with Ziggurat method for Normal distribution

NumPy Trac numpy-tickets@scipy....
Fri Apr 9 23:37:16 CDT 2010


#1450: Patch with Ziggurat method for Normal distribution
---------------------------------+------------------------------------------
 Reporter:  ilan                 |       Owner:  somebody
     Type:  enhancement          |      Status:  new     
 Priority:  normal               |   Milestone:          
Component:  numpy.random         |     Version:  1.4.0   
 Keywords:  normal distribution  |  
---------------------------------+------------------------------------------

Comment(by charris):

 The 'Harris' ziggurat is mine and the code is actually simpler than the
 Marsaglia version (Doornik). I also did the exponential (as did
 Marsaglia), which is even easier. Notice that the Marsaglia version
 actually uses an exponential to bound the tail. So do I, but I make it
 part of the ziggurat, which simplifies matters. It takes maybe ten lines
 of python to compute the needed constants for the various ziggurats. Note
 that in general you can get about 4x speedup vs Box-Muller for the MT rng.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1450#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list