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

Robert Kern rkern at ucsd.edu
Tue Sep 27 15:08:35 CDT 2005


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. What it may
lack in speed it makes up for in readability of code. But I would be
interested in seeing your implementation. I might as well throw it in
and actually see if the performance outweighs the code size.

> Also,
> are the generated uniform doubles "thin" or full precision? For my own use, I
> have made the default doubles thin and on the open interval (0,1) in order to 
> get the best speed and to make taking the log and other such functions that blow
> up at 0 and 1 not require special attention.

It uses the full 53 bits of double precision on [0, 1) by default. I can
add auxiliary methods that do different things. Heck, with a little
work, I could probably make that selectable at runtime for all of the
distributions.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Scipy-dev mailing list