Editing Numbers with a Gaussian distribution

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
{{Source}}
 
{{Source}}
[[Random_numbers |Random number generators]] usually provide numbers having a uniform (flat)
+
[[Random number]] generators usually provide numbers with a uniform (flat)
distribution. However, sometimes it is desirable to generate numbers with some
+
distribution. Sometimes it is desirable to generate numbers with some
other distributions. For example, the [[Gaussian distribution |Gaussian (normal) distribution]] is of paramount importance.
+
other distributions. The Gaussian (normal) distribution is of paramount imporance.
 
==Fortran 90 implementation==
 
==Fortran 90 implementation==
This Fortran 90 function is adapted from Ref. 1, based on an algorithm from the Numerical Recipes collection (Ref. 2). The function '''ran()''' calls a random number generator:
+
This Fortran 90 implementation is adapted from Ref. 1, based on an algorithm from the Numerical Recipes collection, Ref. 2. The function '''ran()''' calls a [[Random_numbers | randon number generator]]:
 
<small><pre>
 
<small><pre>
 
! Returns random numbers distributed following a Gaussian with
 
! Returns random numbers distributed following a Gaussian with
Line 35: Line 35:
 
==References==
 
==References==
 
# Daan Frenkel and Berend Smit "Understanding Molecular Simulation: From Algorithms to Applications" p. 411 Academic Press (1996)
 
# Daan Frenkel and Berend Smit "Understanding Molecular Simulation: From Algorithms to Applications" p. 411 Academic Press (1996)
# [http://www.nr.com Numerical Recipes (Third Edition) website ]
+
# [http://www.nr.com Numerical Recipes]
  
 
[[category: random numbers]]
 
[[category: random numbers]]
 
[[category: computer simulation techniques]]
 
[[category: computer simulation techniques]]

Please note that all contributions to SklogWiki are considered to be released under the Creative Commons Attribution Non-Commercial Share Alike (see SklogWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Template used on this page: