bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl]Bug in discrete random distribution


From: Brian Gough
Subject: Re: [Bug-gsl]Bug in discrete random distribution
Date: Tue, 21 Jan 2003 22:03:38 +0000

ahoward writes:
 > I have found a bug in the discrete random number distribution code of your
 > otherwise excellent package.  For near-uniform distributions,
 > gsl_ran_discrete() sometimes generates invalid numbers (outside the range
 > 0 <= k < K).  Digging around in the code, I found this:
 > 
 > randist/discrete.c:221
 > 
 > /*** Begin Walker's Algorithm ***/
 > 
 > gsl_ran_discrete_t *
 > gsl_ran_discrete_preproc(size_t Kevents, const double *ProbArray)
 > 

Thanks for the bug report, could you send an example program which
exercises the bug (for testing purposes).  Apologies if I already
asked for this, my mailbox got a bit full and I lost track a bit.

-- 
Brian Gough

----------------------------------------------------------------------
Network Theory Ltd            Phone: 0117 3179309 (+44 117 3179309)
15 Royal Park                   WWW: http://www.network-theory.co.uk/
Bristol BS8 3AL               Email: address@hidden     
United Kingdom                
----------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]