🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1571

Random Number Generation in Turbo C 2.0

#1571
From: rmandel
Date: Wed, 14 Mar 1990 16:13
18 lines
1238 bytes
Hi folks,

I'm writing a simulator in Turbo C 2.0, and I need to generate
a pseudo-random number with Gaussian distribution. It doesn't
have to be statistically perfect, but a good approx. is
necessary. I'm using TC's 'random' function to produce my
basic flat distribution (I know random doesn't actually
generate a flat distribution, but if you discard all numbers
between 0 and about 0.4, the rest of the distribution i.e.
0.4 to 1.0 is more or less flat), but have been struggling
to find a way to transform this to a normal/Gaussian/white noise
distribution. 

Has anyone does this? Any help or code fragments (not necessarily
in C) would be greatly appreciated.

Thanks,
Robbie Mandelbaum.
Technical Details
Message-ID: <21720@netnews.upenn.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!brutus.cs.uiuc.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!grad1.cis.upenn.edu!rmandel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!brutus.cs.uiuc.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!grad1.cis.upenn.edu!rmandel
From: rmandel@grad1.cis.upenn.edu
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Random Number Generation in Turbo C 2.0
Keywords: Normal/Gaussian Dist.
Message-ID: <21720@netnews.upenn.edu>
Date: 14 Mar 90 16:13:44 GMT
Sender: news@netnews.upenn.edu
Reply-To: rmandel@grad1.cis.upenn.edu ()
Distribution: usa
Organization: University of Pennsylvania
Lines: 18