Sign in to follow this  

Guassian noise

This topic is 4718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a function that returns a random floating point number between 0 and 1, with uniform division (actually it just uses the standard C++ rand function and normalizes it). How can I easily use it to build a function that'll return a random number with gaussian division? I mean standard normal division, other gaussian divisions are easy to get once you have that one. I know it can be approximated by taking the sum of a few random numbers, but is there a quicker way? Without taking an integral of course, since we're talking about C++ code here.

Share this post


Link to post
Share on other sites
If x have uniform distribution with range 0..1 ,

a=erf -1(x*2 - 1)
will have normal aka gaussian distribution. (note the clickster)

You probably can find some ready-to-use implementations in the web by googling for something like gaussian distribution random generator .

[Edited by - Dmytry on January 16, 2005 12:46:36 PM]

Share this post


Link to post
Share on other sites

This topic is 4718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this