Here you can find the source of gaussian(double mu, double sigma, double x)
public static double gaussian(double mu, double sigma, double x)
//package com.java2s; //License from project: Apache License public class Main { public static double gaussian(double mu, double sigma, double x) { return Math.exp(-0.5 * Math.pow((x - mu), 2) / Math.pow(sigma, 2)) / (Math.sqrt(2 * Math.PI * Math.pow(sigma, 2))); }//from w w w. j a v a2 s. c o m }