Message-ID: <3ED1538A.8DE3E77E@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Non-uniform random variables References: <4dfc324d8c62 DOT 4d8c624dfc32 AT uidaho DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 37 Date: Mon, 26 May 2003 02:43:08 GMT NNTP-Posting-Host: 12.90.171.159 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1053916988 12.90.171.159 (Mon, 26 May 2003 02:43:08 GMT) NNTP-Posting-Date: Mon, 26 May 2003 02:43:08 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com roon8505 AT uidaho DOT edu wrote: > > I'm currently writing a stochastic simulation in which I need to > generate random variables (bounded (0,1)) with non-uniform > distributions. > > The distribution I'm looking for would have: > > 1) an expected value at a user defined 'mean' (e.g. 0.015) > 2) a 'fat-tailed' distribution, kurtosis to the upper end of the > curve > > There are several functions I can think of that could work. E.G. > lognormal, gamma, beta. > > I searched the archives, and found nothing pre-existing. > > Before I try to write my own code, are there any pre-existing > DJGPP modules that will work for me? Look at the functions gaussrand and gausspos in tnmalloc.c, contained in: I was preparing to use them in some long running tests, but have not done so yet. BTW, please control your line length. Lines should always be under 80 chars long (per various RFCs), and 65 or so is optimal. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!