Misc-small-projects/comissions/Marius Norstr-m/gaussian1.py
2017-08-30 01:40:38 +02:00

9 lines
169 B
Python

import math
def f(m, s, x):
fraction = 1/(math.sqrt(2*math.pi)*s)
brackets = -(1.0/2.0)*((x-m)/s)**2
return fraction*math.exp(brackets)
print f(0.0, 2.0, 1.0)