<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.sklogwiki.org/SklogWiki/index.php?action=history&amp;feed=atom&amp;title=Numbers_with_a_Gaussian_distribution</id>
	<title>Numbers with a Gaussian distribution - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.sklogwiki.org/SklogWiki/index.php?action=history&amp;feed=atom&amp;title=Numbers_with_a_Gaussian_distribution"/>
	<link rel="alternate" type="text/html" href="http://www.sklogwiki.org/SklogWiki/index.php?title=Numbers_with_a_Gaussian_distribution&amp;action=history"/>
	<updated>2026-04-28T09:32:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://www.sklogwiki.org/SklogWiki/index.php?title=Numbers_with_a_Gaussian_distribution&amp;diff=4865&amp;oldid=prev</id>
		<title>Carl McBride: Slight tidy up.</title>
		<link rel="alternate" type="text/html" href="http://www.sklogwiki.org/SklogWiki/index.php?title=Numbers_with_a_Gaussian_distribution&amp;diff=4865&amp;oldid=prev"/>
		<updated>2007-11-13T12:31:25Z</updated>

		<summary type="html">&lt;p&gt;Slight tidy up.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:31, 13 November 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Source}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Source}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Random number]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;generators &lt;/del&gt;usually provide numbers &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;with &lt;/del&gt;a uniform (flat)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Random_numbers |&lt;/ins&gt;Random number &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;generators&lt;/ins&gt;]] usually provide numbers &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;having &lt;/ins&gt;a uniform (flat)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;distribution. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sometimes &lt;/del&gt;it is desirable to generate numbers with some&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;distribution. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;However, sometimes &lt;/ins&gt;it is desirable to generate numbers with some&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;other distributions. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The &lt;/del&gt;Gaussian (normal) distribution is of paramount &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;imporance&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;other distributions. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For example, the [[Gaussian distribution |&lt;/ins&gt;Gaussian (normal) distribution&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;is of paramount &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;importance&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Fortran 90 implementation==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Fortran 90 implementation==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This Fortran 90 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;implementation &lt;/del&gt;is adapted from Ref. 1, based on an algorithm from the Numerical Recipes collection&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;Ref. 2. The function &#039;&#039;&#039;ran()&#039;&#039;&#039; calls a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; [[Random_numbers | randon &lt;/del&gt;number generator&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This Fortran 90 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function &lt;/ins&gt;is adapted from Ref. 1, based on an algorithm from the Numerical Recipes collection &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/ins&gt;Ref. 2&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;. The function &#039;&#039;&#039;ran()&#039;&#039;&#039; calls a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;random &lt;/ins&gt;number generator:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Returns random numbers distributed following a Gaussian with&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! Returns random numbers distributed following a Gaussian with&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot;&gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Daan Frenkel and Berend Smit &amp;quot;Understanding Molecular Simulation: From Algorithms to Applications&amp;quot; p. 411 Academic Press (1996)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Daan Frenkel and Berend Smit &amp;quot;Understanding Molecular Simulation: From Algorithms to Applications&amp;quot; p. 411 Academic Press (1996)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [http://www.nr.com Numerical Recipes]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [http://www.nr.com Numerical Recipes &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Third Edition) website &lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category: random numbers]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category: random numbers]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category: computer simulation techniques]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category: computer simulation techniques]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Carl McBride</name></author>
	</entry>
	<entry>
		<id>http://www.sklogwiki.org/SklogWiki/index.php?title=Numbers_with_a_Gaussian_distribution&amp;diff=4864&amp;oldid=prev</id>
		<title>Dduque: New page: {{Source}} Random number generators usually provide numbers with a uniform (flat) distribution. Sometimes it is desirable to generate numbers with some other distributions. The Gaussia...</title>
		<link rel="alternate" type="text/html" href="http://www.sklogwiki.org/SklogWiki/index.php?title=Numbers_with_a_Gaussian_distribution&amp;diff=4864&amp;oldid=prev"/>
		<updated>2007-11-13T12:22:36Z</updated>

		<summary type="html">&lt;p&gt;New page: {{Source}} &lt;a href=&quot;/SklogWiki/index.php?title=Random_number&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Random number (page does not exist)&quot;&gt;Random number&lt;/a&gt; generators usually provide numbers with a uniform (flat) distribution. Sometimes it is desirable to generate numbers with some other distributions. The Gaussia...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Source}}&lt;br /&gt;
[[Random number]] generators usually provide numbers with a uniform (flat)&lt;br /&gt;
distribution. Sometimes it is desirable to generate numbers with some&lt;br /&gt;
other distributions. The Gaussian (normal) distribution is of paramount imporance.&lt;br /&gt;
==Fortran 90 implementation==&lt;br /&gt;
This Fortran 90 implementation is adapted from Ref. 1, based on an algorithm from the Numerical Recipes collection, Ref. 2. The function &amp;#039;&amp;#039;&amp;#039;ran()&amp;#039;&amp;#039;&amp;#039; calls a  [[Random_numbers | randon number generator]]:&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
! Returns random numbers distributed following a Gaussian with&lt;br /&gt;
! unit variance&lt;br /&gt;
&lt;br /&gt;
function gauss()&lt;br /&gt;
&lt;br /&gt;
  implicit none&lt;br /&gt;
&lt;br /&gt;
  real gauss&lt;br /&gt;
&lt;br /&gt;
  real v1,v2,r&lt;br /&gt;
&lt;br /&gt;
  real ranmar&lt;br /&gt;
&lt;br /&gt;
  do&lt;br /&gt;
     v1=2.0*ranmar()-1.0&lt;br /&gt;
     v2=2.0*ranmar()-1.0&lt;br /&gt;
     r=v1*v1+v2*v2&lt;br /&gt;
     if(r.lt.1.0) exit&lt;br /&gt;
  enddo&lt;br /&gt;
&lt;br /&gt;
  gauss=v1*sqrt(-2.0*log(r)/r)&lt;br /&gt;
&lt;br /&gt;
  return&lt;br /&gt;
&lt;br /&gt;
end function gauss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# Daan Frenkel and Berend Smit &amp;quot;Understanding Molecular Simulation: From Algorithms to Applications&amp;quot; p. 411 Academic Press (1996)&lt;br /&gt;
# [http://www.nr.com Numerical Recipes]&lt;br /&gt;
&lt;br /&gt;
[[category: random numbers]]&lt;br /&gt;
[[category: computer simulation techniques]]&lt;/div&gt;</summary>
		<author><name>Dduque</name></author>
	</entry>
</feed>