# Last edited on 2021-07-31 11:53:18 by jstolfi from math import exp def gauss_bell(x): # Gaussian bell function with mean 0, deviation 1, max value 1. # # The function is truncated to zero at {|x| >= 9}, but is # correct to 16 decimals (absolute) nevertheless. # if abs(x) >= 9: w = 0.0 else: w = exp(-x*x/2) return w # ----------------------------------------------------------------------